Patch level :

Files correlati     :
Ricompilazione Demo : [ ]
Commento            : Statistiche: in tutte possibilita' di selezionare solo il riepilogo finale, se stampa una sola sezione non mi fa il riepilogo finale


git-svn-id: svn://10.65.10.50/trunk@7903 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
cris 1999-03-08 15:03:47 +00:00
parent 4212a16944
commit 4c1e0aa5c7
17 changed files with 1031 additions and 882 deletions

View File

@ -93,6 +93,8 @@ class TStatSogxEta : public TApplication
TString16 _catdon; TString16 _catdon;
TDate _data; TDate _data;
TArray _etaini, _etafin; TArray _etaini, _etafin;
bool _solotot;
int _sezionistampate;
protected: protected:
virtual bool create(); virtual bool create();
@ -208,6 +210,7 @@ bool TStatSogxEta::menu(MENU_TAG m)
_sotfin = _msk->get(F_SOTFIN); _sotfin = _msk->get(F_SOTFIN);
_catdon = _msk->get(F_CATDON); _catdon = _msk->get(F_CATDON);
_data = _msk->get_date(F_DATA); _data = _msk->get_date(F_DATA);
_solotot = msk.get_bool(F_SOLOTOT);
TSheet_field& s = (TSheet_field&)_msk->field(F_FASCIE); TSheet_field& s = (TSheet_field&)_msk->field(F_FASCIE);
for (int r=0; r<s.items(); r++) for (int r=0; r<s.items(); r++)
{ {
@ -275,6 +278,7 @@ bool TStatSogxEta::stampa()
{ {
if (printer().open()) if (printer().open())
{ {
_sezionistampate = 0;
crea_intestazione(); crea_intestazione();
TRelation* relstat = new TRelation(LF_ATSTATS); TRelation* relstat = new TRelation(LF_ATSTATS);
TCursor* curstat = new TCursor(relstat, "", 1); TCursor* curstat = new TCursor(relstat, "", 1);
@ -334,9 +338,17 @@ void TStatSogxEta::stampa_sezione(TString16 codsez, TString16 codsot)
TPrintrow row; TPrintrow row;
TString256 rigastampa; TString256 rigastampa;
if (codsez == "ZZ" && codsot == "ZZ") if (codsez == "ZZ" && codsot == "ZZ")
rigastampa = "RIEPILOGO TOTALE PER TUTTE LE SEZIONI STAMPATE"; {
if (_sezionistampate != 1)
{
//rigastampa = "RIEPILOGO TOTALE PER TUTTE LE SEZIONI STAMPATE";
rigastampa = "";
rigastampa << "RIEPILOGO TOTALE SEZIONI DA " << _sezini << '/' << _sotini << " A " << _sezfin << '/' << _sotfin;
}
}
else else
{ {
_sezionistampate++;
rigastampa = "Sezione: "; rigastampa = "Sezione: ";
rigastampa << codsez; rigastampa << codsez;
if (codsot.not_empty()) if (codsot.not_empty())
@ -362,6 +374,8 @@ void TStatSogxEta::stampa_sezione(TString16 codsez, TString16 codsot)
} }
} }
} }
if ((codsez == "ZZ" && codsot == "ZZ" && _sezionistampate != 1) || (codsez != "ZZ"))
{
rigastampa.center_just(120); rigastampa.center_just(120);
row.put(rigastampa); row.put(rigastampa);
printer().setheaderline(1, row); printer().setheaderline(1, row);
@ -472,6 +486,7 @@ void TStatSogxEta::stampa_sezione(TString16 codsez, TString16 codsot)
row.put((const char*) rigastampa); row.put((const char*) rigastampa);
printer().print(row); printer().print(row);
printer().formfeed(); printer().formfeed();
}
} }
bool TStatSogxEta::riepilogo() bool TStatSogxEta::riepilogo()
@ -596,6 +611,8 @@ bool TStatSogxEta::riepilogo()
if (sesso.empty()) if (sesso.empty())
sesso = "9"; sesso = "9";
if (fascia != -1) if (fascia != -1)
{
if (!_solotot)
{ {
stat.zero(); stat.zero();
stat.put(ATSS_CODSEZ, codsez); stat.put(ATSS_CODSEZ, codsez);
@ -619,6 +636,7 @@ bool TStatSogxEta::riepilogo()
stat.put(ATSS_NUMERO, numero); stat.put(ATSS_NUMERO, numero);
stat.write(); stat.write();
} }
}
stat.zero(); stat.zero();
stat.put(ATSS_CODSEZ, "ZZ"); stat.put(ATSS_CODSEZ, "ZZ");
stat.put(ATSS_CODSOT, "ZZ"); stat.put(ATSS_CODSOT, "ZZ");

View File

@ -13,7 +13,8 @@
#define F_CATDON 301 #define F_CATDON 301
#define F_D_CATDON 302 #define F_D_CATDON 302
#define F_DATA 303 #define F_DATA 303
#define F_FASCIE 304 #define F_SOLOTOT 304
#define F_FASCIE 305
#define F_ETAINI 101 #define F_ETAINI 101
#define F_ETAFIN 102 #define F_ETAFIN 102

View File

@ -158,14 +158,19 @@ BEGIN
PROMPT 25 9 "per tutte le categorie non di dimissione" PROMPT 25 9 "per tutte le categorie non di dimissione"
END END
BOOLEAN F_SOLOTOT
BEGIN
PROMPT 2 7 "Stampa solo totale finale (non stampa il dettaglio per sezione)"
END
TEXT DLG_NULL TEXT DLG_NULL
BEGIN BEGIN
PROMPT 2 7 "Fascie di eta'" PROMPT 2 8 "Fascie di eta'"
END END
SPREADSHEET F_FASCIE 15 9 SPREADSHEET F_FASCIE 15 9
BEGIN BEGIN
PROMPT 3 8 "" PROMPT 3 9 ""
ITEM "Da " ITEM "Da "
ITEM "A " ITEM "A "
END END

View File

@ -92,6 +92,8 @@ class TMensileDonxGr : public TApplication
TAssoc_array* _colonne; TAssoc_array* _colonne;
TArray _righe; // array per riepilogo donazioni TArray _righe; // array per riepilogo donazioni
TString16 _sezini, _sotini, _sezfin, _sotfin, _tipodon; TString16 _sezini, _sotini, _sezfin, _sotfin, _tipodon;
bool _solotot;
int _sezionistampate;
protected: protected:
virtual bool create(); virtual bool create();
@ -301,6 +303,7 @@ bool TMensileDonxGr::menu(MENU_TAG m)
_sezfin = _msk->get(F_SEZFIN); _sezfin = _msk->get(F_SEZFIN);
_sotfin = _msk->get(F_SOTFIN); _sotfin = _msk->get(F_SOTFIN);
_tipodon = _msk->get(F_TIPODON); _tipodon = _msk->get(F_TIPODON);
_solotot = msk.get_bool(F_SOLOTOT);
if (riepilogo()) if (riepilogo())
stampa(); stampa();
} }
@ -314,10 +317,10 @@ void TMensileDonxGr::crea_intestazione()
sep = "MENSILE DONAZIONI PER GRUPPO E RH"; sep = "MENSILE DONAZIONI PER GRUPPO E RH";
if (!_tipodon.blank()) if (!_tipodon.blank())
sep << " - TIPO DONAZIONI " << _tipodon; sep << " - TIPO DONAZIONI " << _tipodon;
sep.center_just(80); sep.center_just(101);
row.put(sep); row.put(sep);
row.put("@>", 1); row.put("@>", 1);
row.put("Pag. @#", 70); row.put("Pag. @#", 90);
printer().setheaderline(2, row); printer().setheaderline(2, row);
row.reset(); row.reset();
sep = ""; sep = "";
@ -331,7 +334,7 @@ void TMensileDonxGr::crea_intestazione()
sep << " al "; sep << " al ";
sep << _datafin.string(); sep << _datafin.string();
} }
sep.center_just(80); sep.center_just(101);
row.put(sep); row.put(sep);
printer().setheaderline(3, row); printer().setheaderline(3, row);
row.reset(); row.reset();
@ -343,7 +346,7 @@ void TMensileDonxGr::crea_intestazione()
row.put(sep); row.put(sep);
printer().setheaderline(5, row); printer().setheaderline(5, row);
sep = ""; sep = "";
sep.fill('-',80); sep.fill('-',101);
row.reset(); row.reset();
row.put(sep); row.put(sep);
printer().setheaderline(6, row); printer().setheaderline(6, row);
@ -353,6 +356,7 @@ bool TMensileDonxGr::stampa()
{ {
if (printer().open()) if (printer().open())
{ {
_sezionistampate = 0;
crea_intestazione(); crea_intestazione();
TRelation* relstat = new TRelation(LF_ATSTATD); TRelation* relstat = new TRelation(LF_ATSTATD);
TCursor* curstat = new TCursor(relstat, "", 1); TCursor* curstat = new TCursor(relstat, "", 1);
@ -427,9 +431,17 @@ void TMensileDonxGr::stampa_sezione(TString16 codsez, TString16 codsot)
TPrintrow row; TPrintrow row;
TString256 rigastampa; TString256 rigastampa;
if (codsez == "ZZ" && codsot == "ZZ") if (codsez == "ZZ" && codsot == "ZZ")
rigastampa = "RIEPILOGO TOTALE PER TUTTE LE SEZIONI STAMPATE"; {
if (_sezionistampate != 1)
{
//rigastampa = "RIEPILOGO TOTALE PER TUTTE LE SEZIONI STAMPATE";
rigastampa = "";
rigastampa << "RIEPILOGO TOTALE SEZIONI DA " << _sezini << '/' << _sotini << " A " << _sezfin << '/' << _sotfin;
}
}
else else
{ {
_sezionistampate++;
rigastampa = "Sezione: "; rigastampa = "Sezione: ";
rigastampa << codsez; rigastampa << codsez;
if (codsot.not_empty()) if (codsot.not_empty())
@ -455,7 +467,9 @@ void TMensileDonxGr::stampa_sezione(TString16 codsez, TString16 codsot)
} }
} }
} }
rigastampa.center_just(80); if ((codsez == "ZZ" && codsot == "ZZ" && _sezionistampate != 1) || (codsez != "ZZ"))
{
rigastampa.center_just(101);
row.put(rigastampa); row.put(rigastampa);
printer().setheaderline(1, row); printer().setheaderline(1, row);
@ -501,7 +515,7 @@ void TMensileDonxGr::stampa_sezione(TString16 codsez, TString16 codsot)
} }
// stampa totali per sezione // stampa totali per sezione
rigastampa = ""; rigastampa = "";
rigastampa.fill('-',80); rigastampa.fill('-',101);
row.reset(); row.reset();
row.put(rigastampa); row.put(rigastampa);
printer().print(row); printer().print(row);
@ -524,6 +538,7 @@ void TMensileDonxGr::stampa_sezione(TString16 codsez, TString16 codsot)
row.put((const char*) rigastampa); row.put((const char*) rigastampa);
printer().print(row); printer().print(row);
printer().formfeed(); printer().formfeed();
}
} }
bool TMensileDonxGr::riepilogo() bool TMensileDonxGr::riepilogo()
@ -614,6 +629,8 @@ bool TMensileDonxGr::riepilogo()
mese = datadon.month(); mese = datadon.month();
gruppo = recsog.get(SOG_GRUPPOAB0); gruppo = recsog.get(SOG_GRUPPOAB0);
rh = recsog.get(SOG_RHANTID); rh = recsog.get(SOG_RHANTID);
if (!_solotot)
{
stat.zero(); stat.zero();
stat.put(ATS_CODSEZ, codsez); stat.put(ATS_CODSEZ, codsez);
stat.put(ATS_CODSOT, codsot); stat.put(ATS_CODSOT, codsot);
@ -643,6 +660,7 @@ bool TMensileDonxGr::riepilogo()
stat.put(ATS_NUMERO, numero); stat.put(ATS_NUMERO, numero);
stat.write(); stat.write();
} }
}
stat.zero(); stat.zero();
stat.put(ATS_CODSEZ, "ZZ"); stat.put(ATS_CODSEZ, "ZZ");
stat.put(ATS_CODSOT, "ZZ"); stat.put(ATS_CODSOT, "ZZ");

View File

@ -14,3 +14,4 @@
#define F_DATAFIN 302 #define F_DATAFIN 302
#define F_TIPODON 303 #define F_TIPODON 303
#define F_D_TIPODON 304 #define F_D_TIPODON 304
#define F_SOLOTOT 305

View File

@ -117,7 +117,7 @@ BEGIN
HELP "Sottogruppo finale" HELP "Sottogruppo finale"
END END
GROUPBOX DLG_NULL 77 4 GROUPBOX DLG_NULL 77 5
BEGIN BEGIN
PROMPT 1 5 "Opzioni per la statistica" PROMPT 1 5 "Opzioni per la statistica"
END END
@ -154,6 +154,11 @@ BEGIN
FLAGS "D" FLAGS "D"
END END
BOOLEAN F_SOLOTOT
BEGIN
PROMPT 2 8 "Stampa solo totale finale (non stampa il dettaglio per sezione)"
END
BUTTON DLG_OK 9 2 BUTTON DLG_OK 9 2
BEGIN BEGIN

View File

@ -89,6 +89,8 @@ class TStatSogxCat : public TApplication
TArray _righe; TArray _righe;
TString16 _sezini, _sotini, _sezfin, _sotfin; TString16 _sezini, _sotini, _sezfin, _sotfin;
TDate _dataini, _datafin; TDate _dataini, _datafin;
bool _solotot;
int _sezionistampate;
protected: protected:
virtual bool create(); virtual bool create();
@ -190,6 +192,7 @@ bool TStatSogxCat::menu(MENU_TAG m)
_sotfin = _msk->get(F_SOTFIN); _sotfin = _msk->get(F_SOTFIN);
_dataini = _msk->get_date(F_DATAINI); _dataini = _msk->get_date(F_DATAINI);
_datafin = _msk->get_date(F_DATAFIN); _datafin = _msk->get_date(F_DATAFIN);
_solotot = msk.get_bool(F_SOLOTOT);
if (riepilogo()) if (riepilogo())
stampa(); stampa();
} }
@ -230,6 +233,7 @@ bool TStatSogxCat::stampa()
{ {
if (printer().open()) if (printer().open())
{ {
_sezionistampate = 0;
crea_intestazione(); crea_intestazione();
TRelation* relstat = new TRelation(LF_ATSTATS); TRelation* relstat = new TRelation(LF_ATSTATS);
TCursor* curstat = new TCursor(relstat, "", 1); TCursor* curstat = new TCursor(relstat, "", 1);
@ -300,9 +304,17 @@ void TStatSogxCat::stampa_sezione(TString16 codsez, TString16 codsot)
TPrintrow row; TPrintrow row;
TString256 rigastampa; TString256 rigastampa;
if (codsez == "ZZ" && codsot == "ZZ") if (codsez == "ZZ" && codsot == "ZZ")
rigastampa = "RIEPILOGO TOTALE PER TUTTE LE SEZIONI STAMPATE"; {
if (_sezionistampate != 1)
{
//rigastampa = "RIEPILOGO TOTALE PER TUTTE LE SEZIONI STAMPATE";
rigastampa = "";
rigastampa << "RIEPILOGO TOTALE SEZIONI DA " << _sezini << '/' << _sotini << " A " << _sezfin << '/' << _sotfin;
}
}
else else
{ {
_sezionistampate++;
rigastampa = "Sezione: "; rigastampa = "Sezione: ";
rigastampa << codsez; rigastampa << codsez;
if (codsot.not_empty()) if (codsot.not_empty())
@ -328,6 +340,8 @@ void TStatSogxCat::stampa_sezione(TString16 codsez, TString16 codsot)
} }
} }
} }
if ((codsez == "ZZ" && codsot == "ZZ" && _sezionistampate != 1) || (codsez != "ZZ"))
{
rigastampa.center_just(80); rigastampa.center_just(80);
row.put(rigastampa); row.put(rigastampa);
printer().setheaderline(1, row); printer().setheaderline(1, row);
@ -390,6 +404,7 @@ void TStatSogxCat::stampa_sezione(TString16 codsez, TString16 codsot)
row.put((const char*) rigastampa); row.put((const char*) rigastampa);
printer().print(row); printer().print(row);
printer().formfeed(); printer().formfeed();
}
} }
bool TStatSogxCat::riepilogo() bool TStatSogxCat::riepilogo()
@ -488,6 +503,8 @@ bool TStatSogxCat::riepilogo()
} }
} }
if (cati.not_empty()) if (cati.not_empty())
{
if (!_solotot)
{ {
stat.zero(); stat.zero();
stat.put(ATSS_CODSEZ, codsez); stat.put(ATSS_CODSEZ, codsez);
@ -522,6 +539,7 @@ bool TStatSogxCat::riepilogo()
stat.put(ATSS_NUMERO2, numero2); stat.put(ATSS_NUMERO2, numero2);
stat.write(); stat.write();
} }
}
stat.zero(); stat.zero();
stat.put(ATSS_CODSEZ, "ZZ"); stat.put(ATSS_CODSEZ, "ZZ");
stat.put(ATSS_CODSOT, "ZZ"); stat.put(ATSS_CODSOT, "ZZ");
@ -557,6 +575,8 @@ bool TStatSogxCat::riepilogo()
} }
} }
if (catd.not_empty()) if (catd.not_empty())
{
if (!_solotot)
{ {
stat.zero(); stat.zero();
stat.put(ATSS_CODSEZ, codsez); stat.put(ATSS_CODSEZ, codsez);
@ -591,6 +611,7 @@ bool TStatSogxCat::riepilogo()
stat.put(ATSS_NUMERO2, numero2); stat.put(ATSS_NUMERO2, numero2);
stat.write(); stat.write();
} }
}
stat.zero(); stat.zero();
stat.put(ATSS_CODSEZ, "ZZ"); stat.put(ATSS_CODSEZ, "ZZ");
stat.put(ATSS_CODSOT, "ZZ"); stat.put(ATSS_CODSOT, "ZZ");

View File

@ -12,3 +12,4 @@
#define F_DATAINI 301 #define F_DATAINI 301
#define F_DATAFIN 302 #define F_DATAFIN 302
#define F_SOLOTOT 303

View File

@ -117,7 +117,7 @@ BEGIN
HELP "Sottogruppo finale" HELP "Sottogruppo finale"
END END
GROUPBOX DLG_NULL 77 3 GROUPBOX DLG_NULL 77 4
BEGIN BEGIN
PROMPT 1 5 "Opzioni per la statistica" PROMPT 1 5 "Opzioni per la statistica"
END END
@ -132,6 +132,11 @@ BEGIN
PROMPT 50 6 "al " PROMPT 50 6 "al "
END END
BOOLEAN F_SOLOTOT
BEGIN
PROMPT 2 7 "Stampa solo totale finale (non stampa il dettaglio per sezione)"
END
BUTTON DLG_OK 9 2 BUTTON DLG_OK 9 2
BEGIN BEGIN
PROMPT -12 -1 "" PROMPT -12 -1 ""

View File

@ -89,12 +89,13 @@ class TRiepilogoDonazioni : public TApplication
TLocalisamfile* _donaz; TLocalisamfile* _donaz;
TLocalisamfile* _atstatd; TLocalisamfile* _atstatd;
TDate _dataini, _datafin; TDate _dataini, _datafin;
bool _primedon; bool _primedon, _solotot;
bool _perpunto; bool _perpunto;
TAssoc_array* _colonne; TAssoc_array* _colonne;
TArray _righe; // array per riepilogo donazioni TArray _righe; // array per riepilogo donazioni
TArray _righe_prime; // array per riepilogo prime don TArray _righe_prime; // array per riepilogo prime don
TString16 _sezini, _sotini, _sezfin, _sotfin; TString16 _sezini, _sotini, _sezfin, _sotfin;
int _sezionistampate;
protected: protected:
virtual bool create(); virtual bool create();
@ -245,6 +246,7 @@ bool TRiepilogoDonazioni::menu(MENU_TAG m)
_dataini = msk.get(F_DATAINI); _dataini = msk.get(F_DATAINI);
_datafin = msk.get(F_DATAFIN); _datafin = msk.get(F_DATAFIN);
_primedon = msk.get_bool(F_PRIMEDON); _primedon = msk.get_bool(F_PRIMEDON);
_solotot = msk.get_bool(F_SOLOTOT);
//_perpunto = msk.get_bool(F_PERPUNTO); //_perpunto = msk.get_bool(F_PERPUNTO);
_sezini = _msk->get(F_SEZINI); _sezini = _msk->get(F_SEZINI);
_sotini = _msk->get(F_SOTINI); _sotini = _msk->get(F_SOTINI);
@ -302,6 +304,7 @@ bool TRiepilogoDonazioni::stampa()
{ {
if (printer().open()) if (printer().open())
{ {
_sezionistampate = 0;
crea_intestazione(); crea_intestazione();
TRelation* relstat = new TRelation(LF_ATSTATD); TRelation* relstat = new TRelation(LF_ATSTATD);
TCursor* curstat = new TCursor(relstat, "", 2); TCursor* curstat = new TCursor(relstat, "", 2);
@ -386,9 +389,17 @@ void TRiepilogoDonazioni::stampa_sezione(TString16 codsez, TString16 codsot)
TPrintrow row; TPrintrow row;
TString256 rigastampa; TString256 rigastampa;
if (codsez == "ZZ" && codsot == "ZZ") if (codsez == "ZZ" && codsot == "ZZ")
rigastampa = "RIEPILOGO TOTALE PER TUTTE LE SEZIONI STAMPATE"; {
if (_sezionistampate != 1)
{
//rigastampa = "RIEPILOGO TOTALE PER TUTTE LE SEZIONI STAMPATE";
rigastampa = "";
rigastampa << "RIEPILOGO TOTALE SEZIONI DA " << _sezini << '/' << _sotini << " A " << _sezfin << '/' << _sotfin;
}
}
else else
{ {
_sezionistampate++;
rigastampa = "Sezione: "; rigastampa = "Sezione: ";
rigastampa << codsez; rigastampa << codsez;
if (codsot.not_empty()) if (codsot.not_empty())
@ -414,6 +425,8 @@ void TRiepilogoDonazioni::stampa_sezione(TString16 codsez, TString16 codsot)
} }
} }
} }
if ((codsez == "ZZ" && codsot == "ZZ" && _sezionistampate != 1) || (codsez != "ZZ"))
{
rigastampa.center_just(80); rigastampa.center_just(80);
row.put(rigastampa); row.put(rigastampa);
printer().setheaderline(1, row); printer().setheaderline(1, row);
@ -647,6 +660,7 @@ void TRiepilogoDonazioni::stampa_sezione(TString16 codsez, TString16 codsot)
printer().print(row); printer().print(row);
} }
printer().formfeed(); printer().formfeed();
}
} }
bool TRiepilogoDonazioni::riepilogo() bool TRiepilogoDonazioni::riepilogo()
@ -729,6 +743,8 @@ bool TRiepilogoDonazioni::riepilogo()
primadon = recdon.get_bool(DON_PRIMADON); primadon = recdon.get_bool(DON_PRIMADON);
anno = datadon.year(); anno = datadon.year();
mese = datadon.month(); mese = datadon.month();
if (!_solotot)
{
stat.zero(); stat.zero();
stat.put(ATS_CODSEZ, codsez); stat.put(ATS_CODSEZ, codsez);
stat.put(ATS_CODSOT, codsot); stat.put(ATS_CODSOT, codsot);
@ -762,6 +778,7 @@ bool TRiepilogoDonazioni::riepilogo()
stat.put(ATS_NUMPRIME, numero); stat.put(ATS_NUMPRIME, numero);
stat.write(); stat.write();
} }
}
stat.zero(); stat.zero();
stat.put(ATS_CODSEZ, "ZZ"); stat.put(ATS_CODSEZ, "ZZ");
stat.put(ATS_CODSOT, "ZZ"); stat.put(ATS_CODSOT, "ZZ");

View File

@ -13,4 +13,5 @@
#define F_DATAINI 301 #define F_DATAINI 301
#define F_DATAFIN 302 #define F_DATAFIN 302
#define F_PRIMEDON 303 #define F_PRIMEDON 303
#define F_SOLOTOT 304
//#define F_PERPUNTO 304 //#define F_PERPUNTO 304

View File

@ -117,7 +117,7 @@ BEGIN
HELP "Sottogruppo finale" HELP "Sottogruppo finale"
END END
GROUPBOX DLG_NULL 77 5 GROUPBOX DLG_NULL 77 6
BEGIN BEGIN
PROMPT 1 5 "Opzioni per il riepilogo" PROMPT 1 5 "Opzioni per il riepilogo"
END END
@ -139,6 +139,12 @@ BEGIN
PROMPT 2 7 "Riepilogo per prime donazioni" PROMPT 2 7 "Riepilogo per prime donazioni"
END END
BOOLEAN F_SOLOTOT
BEGIN
PROMPT 2 8 "Stampa solo totale finale (non stampa il dettaglio per sezione)"
END
BUTTON DLG_OK 9 2 BUTTON DLG_OK 9 2
BEGIN BEGIN
PROMPT -12 -1 "" PROMPT -12 -1 ""

View File

@ -95,6 +95,7 @@ class TStatDonGrRh : public TApplication
TString16 _sezini, _sotini, _sezfin, _sotfin; TString16 _sezini, _sotini, _sezfin, _sotfin;
TAssoc_array* _asoggetti; TAssoc_array* _asoggetti;
bool _solotot; bool _solotot;
int _sezionistampate;
protected: protected:
virtual bool create(); virtual bool create();
@ -299,6 +300,7 @@ bool TStatDonGrRh::stampa()
{ {
if (printer().open()) if (printer().open())
{ {
_sezionistampate = 0;
crea_intestazione(); crea_intestazione();
TRelation* relstat = new TRelation(LF_ATSTATD); TRelation* relstat = new TRelation(LF_ATSTATD);
TCursor* curstat = new TCursor(relstat, "", 3); TCursor* curstat = new TCursor(relstat, "", 3);
@ -396,9 +398,17 @@ void TStatDonGrRh::stampa_sezione(TString16 codsez, TString16 codsot)
TPrintrow row; TPrintrow row;
TString256 rigastampa; TString256 rigastampa;
if (codsez == "ZZ" && codsot == "ZZ") if (codsez == "ZZ" && codsot == "ZZ")
rigastampa = "RIEPILOGO TOTALE PER TUTTE LE SEZIONI SELEZIONATE"; {
if (_sezionistampate != 1)
{
//rigastampa = "RIEPILOGO TOTALE PER TUTTE LE SEZIONI STAMPATE";
rigastampa = "";
rigastampa << "RIEPILOGO TOTALE SEZIONI DA " << _sezini << '/' << _sotini << " A " << _sezfin << '/' << _sotfin;
}
}
else else
{ {
_sezionistampate++;
rigastampa = "Sezione: "; rigastampa = "Sezione: ";
rigastampa << codsez; rigastampa << codsez;
if (codsot.not_empty()) if (codsot.not_empty())
@ -424,6 +434,8 @@ void TStatDonGrRh::stampa_sezione(TString16 codsez, TString16 codsot)
} }
} }
} }
if ((codsez == "ZZ" && codsot == "ZZ" && _sezionistampate != 1) || (codsez != "ZZ"))
{
rigastampa.center_just(80); rigastampa.center_just(80);
row.put(rigastampa); row.put(rigastampa);
printer().setheaderline(1, row); printer().setheaderline(1, row);
@ -628,6 +640,7 @@ void TStatDonGrRh::stampa_sezione(TString16 codsez, TString16 codsot)
row.put((const char*) rigastampa); row.put((const char*) rigastampa);
printer().print(row); printer().print(row);
printer().formfeed(); printer().formfeed();
}
} }
bool TStatDonGrRh::riepilogo() bool TStatDonGrRh::riepilogo()

View File

@ -91,6 +91,8 @@ class TStatisticaSog : public TApplication
TString16 _sezini, _sotini, _sezfin, _sotfin; TString16 _sezini, _sotini, _sezfin, _sotfin;
TString16 _catdon; TString16 _catdon;
TDate _data; TDate _data;
bool _solotot;
int _sezionistampate;
protected: protected:
virtual bool create(); virtual bool create();
@ -232,6 +234,7 @@ bool TStatisticaSog::menu(MENU_TAG m)
_sotfin = _msk->get(F_SOTFIN); _sotfin = _msk->get(F_SOTFIN);
_catdon = _msk->get(F_CATDON); _catdon = _msk->get(F_CATDON);
_data = _msk->get_date(F_DATA); _data = _msk->get_date(F_DATA);
_solotot = msk.get_bool(F_SOLOTOT);
if (riepilogo()) if (riepilogo())
stampa(); stampa();
} }
@ -282,6 +285,7 @@ bool TStatisticaSog::stampa()
{ {
if (printer().open()) if (printer().open())
{ {
_sezionistampate = 0;
crea_intestazione(); crea_intestazione();
TRelation* relstat = new TRelation(LF_ATSTATS); TRelation* relstat = new TRelation(LF_ATSTATS);
TCursor* curstat = new TCursor(relstat, "", 1); TCursor* curstat = new TCursor(relstat, "", 1);
@ -363,9 +367,17 @@ void TStatisticaSog::stampa_sezione(TString16 codsez, TString16 codsot)
TPrintrow row; TPrintrow row;
TString256 rigastampa; TString256 rigastampa;
if (codsez == "ZZ" && codsot == "ZZ") if (codsez == "ZZ" && codsot == "ZZ")
rigastampa = "RIEPILOGO TOTALE PER TUTTE LE SEZIONI STAMPATE"; {
if (_sezionistampate != 1)
{
//rigastampa = "RIEPILOGO TOTALE PER TUTTE LE SEZIONI STAMPATE";
rigastampa = "";
rigastampa << "RIEPILOGO TOTALE SEZIONI DA " << _sezini << '/' << _sotini << " A " << _sezfin << '/' << _sotfin;
}
}
else else
{ {
_sezionistampate++;
rigastampa = "Sezione: "; rigastampa = "Sezione: ";
rigastampa << codsez; rigastampa << codsez;
if (codsot.not_empty()) if (codsot.not_empty())
@ -391,6 +403,8 @@ void TStatisticaSog::stampa_sezione(TString16 codsez, TString16 codsot)
} }
} }
} }
if ((codsez == "ZZ" && codsot == "ZZ" && _sezionistampate != 1) || (codsez != "ZZ"))
{
rigastampa.center_just(80); rigastampa.center_just(80);
row.put(rigastampa); row.put(rigastampa);
printer().setheaderline(1, row); printer().setheaderline(1, row);
@ -474,6 +488,7 @@ void TStatisticaSog::stampa_sezione(TString16 codsez, TString16 codsot)
row.put((const char*) rigastampa); row.put((const char*) rigastampa);
printer().print(row); printer().print(row);
printer().formfeed(); printer().formfeed();
}
} }
bool TStatisticaSog::riepilogo() bool TStatisticaSog::riepilogo()
@ -597,6 +612,8 @@ bool TStatisticaSog::riepilogo()
gruppo = "A"; gruppo = "A";
if (gruppo == "A1B" || gruppo == "A2B") if (gruppo == "A1B" || gruppo == "A2B")
gruppo = "AB"; gruppo = "AB";
if (!_solotot)
{
stat.zero(); stat.zero();
stat.put(ATSS_CODSEZ, codsez); stat.put(ATSS_CODSEZ, codsez);
stat.put(ATSS_CODSOT, codsot); stat.put(ATSS_CODSOT, codsot);
@ -621,6 +638,7 @@ bool TStatisticaSog::riepilogo()
stat.put(ATSS_NUMERO, numero); stat.put(ATSS_NUMERO, numero);
stat.write(); stat.write();
} }
}
stat.zero(); stat.zero();
stat.put(ATSS_CODSEZ, "ZZ"); stat.put(ATSS_CODSEZ, "ZZ");
stat.put(ATSS_CODSOT, "ZZ"); stat.put(ATSS_CODSOT, "ZZ");

View File

@ -13,3 +13,4 @@
#define F_CATDON 301 #define F_CATDON 301
#define F_D_CATDON 302 #define F_D_CATDON 302
#define F_DATA 303 #define F_DATA 303
#define F_SOLOTOT 304

View File

@ -117,7 +117,7 @@ BEGIN
HELP "Sottogruppo finale" HELP "Sottogruppo finale"
END END
GROUPBOX DLG_NULL 77 5 GROUPBOX DLG_NULL 77 6
BEGIN BEGIN
PROMPT 1 5 "Opzioni per la statistica" PROMPT 1 5 "Opzioni per la statistica"
END END
@ -158,6 +158,11 @@ BEGIN
PROMPT 2 8 "per tutte le categorie non di dimissione" PROMPT 2 8 "per tutte le categorie non di dimissione"
END END
BOOLEAN F_SOLOTOT
BEGIN
PROMPT 2 9 "Stampa solo totale finale (non stampa il dettaglio per sezione)"
END
BUTTON DLG_OK 9 2 BUTTON DLG_OK 9 2
BEGIN BEGIN
PROMPT -12 -1 "" PROMPT -12 -1 ""

View File

@ -92,6 +92,7 @@ class TRiepilogoPunto : public TApplication
TArray _righe; // array per riepilogo donazioni TArray _righe; // array per riepilogo donazioni
TString16 _sezini, _sotini, _sezfin, _sotfin; TString16 _sezini, _sotini, _sezfin, _sotfin;
bool _solotot; bool _solotot;
int _sezionistampate;
protected: protected:
virtual bool create(); virtual bool create();
@ -253,6 +254,7 @@ bool TRiepilogoPunto::stampa()
{ {
if (printer().open()) if (printer().open())
{ {
_sezionistampate = 0;
crea_intestazione(); crea_intestazione();
TRelation* relstat = new TRelation(LF_ATSTATD); TRelation* relstat = new TRelation(LF_ATSTATD);
TCursor* curstat = new TCursor(relstat, "", 1); TCursor* curstat = new TCursor(relstat, "", 1);
@ -318,9 +320,17 @@ void TRiepilogoPunto::stampa_sezione(TString16 codsez, TString16 codsot)
TPrintrow row; TPrintrow row;
TString256 rigastampa; TString256 rigastampa;
if (codsez == "ZZ" && codsot == "ZZ") if (codsez == "ZZ" && codsot == "ZZ")
rigastampa = "RIEPILOGO TOTALE PER TUTTE LE SEZIONI SELEZIONATE"; {
if (_sezionistampate != 1)
{
//rigastampa = "RIEPILOGO TOTALE PER TUTTE LE SEZIONI STAMPATE";
rigastampa = "";
rigastampa << "RIEPILOGO TOTALE SEZIONI DA " << _sezini << '/' << _sotini << " A " << _sezfin << '/' << _sotfin;
}
}
else else
{ {
_sezionistampate++;
rigastampa = "Sezione: "; rigastampa = "Sezione: ";
rigastampa << codsez; rigastampa << codsez;
if (codsot.not_empty()) if (codsot.not_empty())
@ -346,6 +356,8 @@ void TRiepilogoPunto::stampa_sezione(TString16 codsez, TString16 codsot)
} }
} }
} }
if ((codsez == "ZZ" && codsot == "ZZ" && _sezionistampate != 1) || (codsez != "ZZ"))
{
rigastampa.center_just(80); rigastampa.center_just(80);
row.put(rigastampa); row.put(rigastampa);
printer().setheaderline(1, row); printer().setheaderline(1, row);
@ -440,6 +452,7 @@ void TRiepilogoPunto::stampa_sezione(TString16 codsez, TString16 codsot)
row.reset(); row.reset();
printer().setheaderline(3, row); printer().setheaderline(3, row);
printer().formfeed(); printer().formfeed();
}
} }
bool TRiepilogoPunto::riepilogo() bool TRiepilogoPunto::riepilogo()