Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : tolto controllo inutile (stringa.ok()) e messo totale parziale e finale git-svn-id: svn://10.65.10.50/trunk@9227 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
1aa1628827
commit
2cbf368c17
@ -44,7 +44,7 @@ class TStampaSospesi : public TPrintapp
|
|||||||
TDate _dataini, _datafin, _sodataini, _sodatafin;
|
TDate _dataini, _datafin, _sodataini, _sodatafin;
|
||||||
ts _tipostampa;
|
ts _tipostampa;
|
||||||
TString16 _codsez, _codsot, _motivo1, _motivo2, _motivo3, _motivo4, _motivo5, _tiposo, _prosstipo;
|
TString16 _codsez, _codsot, _motivo1, _motivo2, _motivo3, _motivo4, _motivo5, _tiposo, _prosstipo;
|
||||||
int _etlarghezza, _etcolonne, _contatore;
|
int _etlarghezza, _etcolonne, _contatore, _totale;
|
||||||
bool _motivi;
|
bool _motivi;
|
||||||
|
|
||||||
static bool filter_func_sospesi(const TRelation* rel);
|
static bool filter_func_sospesi(const TRelation* rel);
|
||||||
@ -62,6 +62,7 @@ public:
|
|||||||
void filtra_sezioni();
|
void filtra_sezioni();
|
||||||
void header_sezione(const TString16 codsez, const TString16 codsot);
|
void header_sezione(const TString16 codsez, const TString16 codsot);
|
||||||
void footer_sezione();
|
void footer_sezione();
|
||||||
|
void fine_stampa();
|
||||||
TMask& app_mask() { return *_msk; }
|
TMask& app_mask() { return *_msk; }
|
||||||
TStampaSospesi() : _data_stampa(TODAY), _cognome_nome("",25), _dencom("",30), _motivo("",5) {}
|
TStampaSospesi() : _data_stampa(TODAY), _cognome_nome("",25), _dencom("",30), _motivo("",5) {}
|
||||||
};
|
};
|
||||||
@ -281,6 +282,7 @@ bool TStampaSospesi::preprocess_page(int file, int counter)
|
|||||||
if (printer().rows_left() < _form_eti->get_body().height())
|
if (printer().rows_left() < _form_eti->get_body().height())
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
_contatore++;
|
_contatore++;
|
||||||
|
_totale++;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -288,6 +290,7 @@ print_action TStampaSospesi::postprocess_print(int file, int counter)
|
|||||||
{
|
{
|
||||||
if (_contatore > 0)
|
if (_contatore > 0)
|
||||||
footer_sezione();
|
footer_sezione();
|
||||||
|
fine_stampa();
|
||||||
return NEXT_PAGE;
|
return NEXT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,6 +335,24 @@ void TStampaSospesi::footer_sezione()
|
|||||||
reset_footer();
|
reset_footer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TStampaSospesi::fine_stampa()
|
||||||
|
{
|
||||||
|
// stampa totale soggetti a fine stampa
|
||||||
|
if (_tipostampa==sintetico || _tipostampa==completo)
|
||||||
|
{
|
||||||
|
reset_footer();
|
||||||
|
TString sep(80);
|
||||||
|
sep.fill('-');
|
||||||
|
set_footer(2, (const char *) sep);
|
||||||
|
if (_totale > 0 && _totale != _contatore)
|
||||||
|
{
|
||||||
|
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _totale);
|
||||||
|
printer().formfeed();
|
||||||
|
}
|
||||||
|
reset_footer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool TStampaSospesi::set_print(int m)
|
bool TStampaSospesi::set_print(int m)
|
||||||
{
|
{
|
||||||
@ -347,6 +368,7 @@ bool TStampaSospesi::set_print(int m)
|
|||||||
_tipostampa = sintetico;
|
_tipostampa = sintetico;
|
||||||
_codsez = _codsot = "**";
|
_codsez = _codsot = "**";
|
||||||
_contatore = 0;
|
_contatore = 0;
|
||||||
|
_totale = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case F_COMPLETO:
|
case F_COMPLETO:
|
||||||
@ -354,7 +376,8 @@ bool TStampaSospesi::set_print(int m)
|
|||||||
_tipostampa = completo;
|
_tipostampa = completo;
|
||||||
_codsez = _codsot = "**";
|
_codsez = _codsot = "**";
|
||||||
_contatore = 0;
|
_contatore = 0;
|
||||||
}
|
_totale = 0;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case F_ETICHETTE:
|
case F_ETICHETTE:
|
||||||
_tipostampa = (configura_stampante(p, "AT_ETICHETTE", "etichette")) ? etichette : undefined;
|
_tipostampa = (configura_stampante(p, "AT_ETICHETTE", "etichette")) ? etichette : undefined;
|
||||||
|
@ -42,7 +42,7 @@ class TStampaPerEta : public TPrintapp
|
|||||||
TDate _dataini, _datafin;
|
TDate _dataini, _datafin;
|
||||||
ts _tipostampa;
|
ts _tipostampa;
|
||||||
TString16 _codsez, _codsot;
|
TString16 _codsez, _codsot;
|
||||||
int _etlarghezza, _etcolonne;
|
int _etlarghezza, _etcolonne, _contatore, _totale;
|
||||||
bool _stampa80;
|
bool _stampa80;
|
||||||
|
|
||||||
|
|
||||||
@ -58,6 +58,8 @@ public:
|
|||||||
void crea_intestazione();
|
void crea_intestazione();
|
||||||
void filtra_sezioni();
|
void filtra_sezioni();
|
||||||
void header_sezione(const TString16 codsez, const TString16 codsot);
|
void header_sezione(const TString16 codsez, const TString16 codsot);
|
||||||
|
void footer_sezione();
|
||||||
|
void fine_stampa();
|
||||||
TMask& app_mask() { return *_msk; }
|
TMask& app_mask() { return *_msk; }
|
||||||
|
|
||||||
TStampaPerEta() : _data_stampa(TODAY), _cognome_nome("",25), _dencom("",50) {}
|
TStampaPerEta() : _data_stampa(TODAY), _cognome_nome("",25), _dencom("",50) {}
|
||||||
@ -189,7 +191,7 @@ void TStampaPerEta::header_sezione(const TString16 codsez, const TString16 codso
|
|||||||
intestazione << codsot;
|
intestazione << codsot;
|
||||||
intestazione << ' ';
|
intestazione << ' ';
|
||||||
intestazione << densez;
|
intestazione << densez;
|
||||||
if ((densot.ok())&& (densot.not_empty()))
|
if (densot.not_empty())
|
||||||
{
|
{
|
||||||
intestazione << '/';
|
intestazione << '/';
|
||||||
intestazione << densot;
|
intestazione << densot;
|
||||||
@ -228,7 +230,8 @@ bool TStampaPerEta::preprocess_page(int file, int counter)
|
|||||||
if ((_codsez!=codsez)||(_codsot!=codsot))
|
if ((_codsez!=codsez)||(_codsot!=codsot))
|
||||||
{
|
{
|
||||||
if (_codsez != "**")
|
if (_codsez != "**")
|
||||||
printer().formfeed();
|
footer_sezione();
|
||||||
|
_contatore = 0;
|
||||||
_codsez = codsez;
|
_codsez = codsez;
|
||||||
_codsot = codsot;
|
_codsot = codsot;
|
||||||
header_sezione(codsez, codsot);
|
header_sezione(codsez, codsot);
|
||||||
@ -239,15 +242,52 @@ bool TStampaPerEta::preprocess_page(int file, int counter)
|
|||||||
if (_tipostampa==etichette)
|
if (_tipostampa==etichette)
|
||||||
if (printer().rows_left() < _form_eti->get_body().height())
|
if (printer().rows_left() < _form_eti->get_body().height())
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
|
_contatore++;
|
||||||
|
_totale++;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
print_action TStampaPerEta::postprocess_print(int file, int counter)
|
print_action TStampaPerEta::postprocess_print(int file, int counter)
|
||||||
{
|
{
|
||||||
printer().formfeed();
|
if (_contatore > 0)
|
||||||
|
footer_sezione();
|
||||||
|
fine_stampa();
|
||||||
return NEXT_PAGE;
|
return NEXT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TStampaPerEta::footer_sezione()
|
||||||
|
{
|
||||||
|
// stampa totale soggetti appartenenti alla sezione
|
||||||
|
if (_tipostampa==elenco)
|
||||||
|
{
|
||||||
|
reset_footer();
|
||||||
|
TString sep(80);
|
||||||
|
sep.fill('-');
|
||||||
|
set_footer(2, (const char *) sep);
|
||||||
|
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _contatore);
|
||||||
|
printer().formfeed();
|
||||||
|
reset_footer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TStampaPerEta::fine_stampa()
|
||||||
|
{
|
||||||
|
// stampa totale soggetti a fine stampa
|
||||||
|
if (_tipostampa==elenco)
|
||||||
|
{
|
||||||
|
reset_footer();
|
||||||
|
TString sep(80);
|
||||||
|
sep.fill('-');
|
||||||
|
set_footer(2, (const char *) sep);
|
||||||
|
if (_totale > 0 && _totale != _contatore)
|
||||||
|
{
|
||||||
|
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _totale);
|
||||||
|
printer().formfeed();
|
||||||
|
}
|
||||||
|
reset_footer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool TStampaPerEta::set_print(int m)
|
bool TStampaPerEta::set_print(int m)
|
||||||
{
|
{
|
||||||
TPrinter& p = printer();
|
TPrinter& p = printer();
|
||||||
@ -262,6 +302,8 @@ bool TStampaPerEta::set_print(int m)
|
|||||||
_tipostampa = elenco;
|
_tipostampa = elenco;
|
||||||
_codsez = "**";
|
_codsez = "**";
|
||||||
_codsot = "**";
|
_codsot = "**";
|
||||||
|
_contatore = 0;
|
||||||
|
_totale = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case F_ETICHETTE:
|
case F_ETICHETTE:
|
||||||
@ -282,20 +324,21 @@ bool TStampaPerEta::set_print(int m)
|
|||||||
const TString16 catqua = _msk->get(F_CAT4);
|
const TString16 catqua = _msk->get(F_CAT4);
|
||||||
const TString16 catqui = _msk->get(F_CAT5);
|
const TString16 catqui = _msk->get(F_CAT5);
|
||||||
const TString16 catses = _msk->get(F_CAT6);
|
const TString16 catses = _msk->get(F_CAT6);
|
||||||
if (catpri.not_empty() && catpri.ok())
|
if (catpri.not_empty())
|
||||||
_categorie.add((const char*) catpri);
|
_categorie.add((const char*) catpri);
|
||||||
if (catsec.not_empty() && catsec.ok())
|
if (catsec.not_empty())
|
||||||
_categorie.add((const char*) catsec);
|
_categorie.add((const char*) catsec);
|
||||||
if (catter.not_empty() && catter.ok())
|
if (catter.not_empty())
|
||||||
_categorie.add((const char*) catter);
|
_categorie.add((const char*) catter);
|
||||||
if (catqua.not_empty() && catqua.ok())
|
if (catqua.not_empty())
|
||||||
_categorie.add((const char*) catqua);
|
_categorie.add((const char*) catqua);
|
||||||
if (catqui.not_empty() && catqui.ok())
|
if (catqui.not_empty())
|
||||||
_categorie.add((const char*) catqui);
|
_categorie.add((const char*) catqui);
|
||||||
if (catses.not_empty() && catses.ok())
|
if (catses.not_empty())
|
||||||
_categorie.add((const char*) catses);
|
_categorie.add((const char*) catses);
|
||||||
current_cursor()->set_filterfunction (filter_func_pereta);
|
current_cursor()->set_filterfunction (filter_func_pereta);
|
||||||
reset_print();
|
reset_print();
|
||||||
|
printer().footerlen(0);
|
||||||
crea_intestazione();
|
crea_intestazione();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -353,6 +396,7 @@ void TStampaPerEta::crea_intestazione()
|
|||||||
set_header(5,"@0gTessera@49gCAP/Località/Comune/Prov.@116gTelefono altro");
|
set_header(5,"@0gTessera@49gCAP/Località/Comune/Prov.@116gTelefono altro");
|
||||||
set_header(6,"@0g--------@9g--@12g-------------------------@38g----------@49g--------------------------------------------------@100g---------------@116g---------------");
|
set_header(6,"@0g--------@9g--@12g-------------------------@38g----------@49g--------------------------------------------------@100g---------------@116g---------------");
|
||||||
}
|
}
|
||||||
|
printer().footerlen(3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class TStampaEsclusi : public TPrintapp
|
|||||||
TDate _data_stampa;
|
TDate _data_stampa;
|
||||||
ts _tipostampa;
|
ts _tipostampa;
|
||||||
TString16 _codsez, _codsot;
|
TString16 _codsez, _codsot;
|
||||||
int _etlarghezza, _etcolonne;
|
int _etlarghezza, _etcolonne, _totale, _contatore;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool user_create();
|
virtual bool user_create();
|
||||||
@ -57,6 +57,8 @@ public:
|
|||||||
void crea_intestazione();
|
void crea_intestazione();
|
||||||
void filtra_sezioni();
|
void filtra_sezioni();
|
||||||
void header_sezione(const TString16 codsez, const TString16 codsot);
|
void header_sezione(const TString16 codsez, const TString16 codsot);
|
||||||
|
void footer_sezione();
|
||||||
|
void fine_stampa();
|
||||||
TMask& app_mask() { return *_msk; }
|
TMask& app_mask() { return *_msk; }
|
||||||
TStampaEsclusi() : _data_stampa(TODAY), _cognome_nome("",25) {}
|
TStampaEsclusi() : _data_stampa(TODAY), _cognome_nome("",25) {}
|
||||||
};
|
};
|
||||||
@ -155,7 +157,8 @@ bool TStampaEsclusi::preprocess_page(int file, int counter)
|
|||||||
if ((_codsez!=codsez)||(_codsot!=codsot))
|
if ((_codsez!=codsez)||(_codsot!=codsot))
|
||||||
{
|
{
|
||||||
if (_codsez != "**")
|
if (_codsez != "**")
|
||||||
printer().formfeed();
|
footer_sezione();
|
||||||
|
_contatore = 0;
|
||||||
_codsez = codsez;
|
_codsez = codsez;
|
||||||
_codsot = codsot;
|
_codsot = codsot;
|
||||||
header_sezione(codsez, codsot);
|
header_sezione(codsez, codsot);
|
||||||
@ -164,12 +167,16 @@ bool TStampaEsclusi::preprocess_page(int file, int counter)
|
|||||||
if (_tipostampa==etichette)
|
if (_tipostampa==etichette)
|
||||||
if (printer().rows_left() < _form_eti->get_body().height())
|
if (printer().rows_left() < _form_eti->get_body().height())
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
|
_contatore++;
|
||||||
|
_totale++;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
print_action TStampaEsclusi::postprocess_print(int file, int counter)
|
print_action TStampaEsclusi::postprocess_print(int file, int counter)
|
||||||
{
|
{
|
||||||
printer().formfeed();
|
if (_contatore > 0)
|
||||||
|
footer_sezione();
|
||||||
|
fine_stampa();
|
||||||
return NEXT_PAGE;
|
return NEXT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,7 +191,7 @@ void TStampaEsclusi::header_sezione(const TString16 codsez, const TString16 cods
|
|||||||
intestazione << codsot;
|
intestazione << codsot;
|
||||||
intestazione << " ";
|
intestazione << " ";
|
||||||
intestazione << densez;
|
intestazione << densez;
|
||||||
if ((densot.ok())&& (densot.not_empty()))
|
if (densot.not_empty())
|
||||||
{
|
{
|
||||||
intestazione << "/";
|
intestazione << "/";
|
||||||
intestazione << densot;
|
intestazione << densot;
|
||||||
@ -194,6 +201,39 @@ void TStampaEsclusi::header_sezione(const TString16 codsez, const TString16 cods
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TStampaEsclusi::footer_sezione()
|
||||||
|
{
|
||||||
|
// stampa totale soggetti appartenenti alla sezione
|
||||||
|
if (_tipostampa==elenco)
|
||||||
|
{
|
||||||
|
reset_footer();
|
||||||
|
TString sep(80);
|
||||||
|
sep.fill('-');
|
||||||
|
set_footer(2, (const char *) sep);
|
||||||
|
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _contatore);
|
||||||
|
printer().formfeed();
|
||||||
|
reset_footer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TStampaEsclusi::fine_stampa()
|
||||||
|
{
|
||||||
|
// stampa totale soggetti a fine stampa
|
||||||
|
if (_tipostampa==elenco)
|
||||||
|
{
|
||||||
|
reset_footer();
|
||||||
|
TString sep(80);
|
||||||
|
sep.fill('-');
|
||||||
|
set_footer(2, (const char *) sep);
|
||||||
|
if (_totale > 0 && _totale != _contatore)
|
||||||
|
{
|
||||||
|
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _totale);
|
||||||
|
printer().formfeed();
|
||||||
|
}
|
||||||
|
reset_footer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool TStampaEsclusi::set_print(int)
|
bool TStampaEsclusi::set_print(int)
|
||||||
{
|
{
|
||||||
TPrinter& p = printer();
|
TPrinter& p = printer();
|
||||||
@ -208,6 +248,8 @@ bool TStampaEsclusi::set_print(int)
|
|||||||
_tipostampa = elenco;
|
_tipostampa = elenco;
|
||||||
_codsez = "**";
|
_codsez = "**";
|
||||||
_codsot = "**";
|
_codsot = "**";
|
||||||
|
_contatore = 0;
|
||||||
|
_totale = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case F_ETICHETTE:
|
case F_ETICHETTE:
|
||||||
@ -221,7 +263,7 @@ bool TStampaEsclusi::set_print(int)
|
|||||||
filtra_sezioni();
|
filtra_sezioni();
|
||||||
// filtro per tipo esclusione
|
// filtro per tipo esclusione
|
||||||
_tipoesc = _msk->get(F_TIPO);
|
_tipoesc = _msk->get(F_TIPO);
|
||||||
if (_tipoesc.not_empty() && _tipoesc.ok())
|
if (_tipoesc.not_empty())
|
||||||
current_cursor()->setfilter(format("ESCLUSO == \"%s\"",(const char*)_tipoesc));
|
current_cursor()->setfilter(format("ESCLUSO == \"%s\"",(const char*)_tipoesc));
|
||||||
else
|
else
|
||||||
current_cursor()->setfilter("ESCLUSO != \"\"");
|
current_cursor()->setfilter("ESCLUSO != \"\"");
|
||||||
@ -233,22 +275,23 @@ bool TStampaEsclusi::set_print(int)
|
|||||||
const TString16 catqua = _msk->get(F_CAT4);
|
const TString16 catqua = _msk->get(F_CAT4);
|
||||||
const TString16 catqui = _msk->get(F_CAT5);
|
const TString16 catqui = _msk->get(F_CAT5);
|
||||||
const TString16 catses = _msk->get(F_CAT6);
|
const TString16 catses = _msk->get(F_CAT6);
|
||||||
if (catpri.not_empty() && catpri.ok())
|
if (catpri.not_empty())
|
||||||
_categorie.add((const char*) catpri);
|
_categorie.add((const char*) catpri);
|
||||||
if (catsec.not_empty() && catsec.ok())
|
if (catsec.not_empty())
|
||||||
_categorie.add((const char*) catsec);
|
_categorie.add((const char*) catsec);
|
||||||
if (catter.not_empty() && catter.ok())
|
if (catter.not_empty())
|
||||||
_categorie.add((const char*) catter);
|
_categorie.add((const char*) catter);
|
||||||
if (catqua.not_empty() && catqua.ok())
|
if (catqua.not_empty())
|
||||||
_categorie.add((const char*) catqua);
|
_categorie.add((const char*) catqua);
|
||||||
if (catqui.not_empty() && catqui.ok())
|
if (catqui.not_empty())
|
||||||
_categorie.add((const char*) catqui);
|
_categorie.add((const char*) catqui);
|
||||||
if (catses.not_empty() && catses.ok())
|
if (catses.not_empty())
|
||||||
_categorie.add((const char*) catses);
|
_categorie.add((const char*) catses);
|
||||||
// filtro per termine esclusione
|
// filtro per termine esclusione
|
||||||
_termineesc = _msk->get(F_DATA);
|
_termineesc = _msk->get(F_DATA);
|
||||||
current_cursor()->set_filterfunction(filter_func_esclusi);
|
current_cursor()->set_filterfunction(filter_func_esclusi);
|
||||||
reset_print();
|
reset_print();
|
||||||
|
printer().footerlen(0);
|
||||||
crea_intestazione();
|
crea_intestazione();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -263,7 +306,7 @@ void TStampaEsclusi::crea_intestazione()
|
|||||||
{
|
{
|
||||||
TString sep(100);
|
TString sep(100);
|
||||||
sep = "ELENCO ESCLUSI";
|
sep = "ELENCO ESCLUSI";
|
||||||
if ((_tipoesc.ok()) && (_tipoesc.not_empty()))
|
if (_tipoesc.not_empty())
|
||||||
{
|
{
|
||||||
sep << " ";
|
sep << " ";
|
||||||
sep << _tipoesc;
|
sep << _tipoesc;
|
||||||
@ -286,6 +329,7 @@ void TStampaEsclusi::crea_intestazione()
|
|||||||
set_header(4,"@0gCodice@9gC.@12gCognome e nome@38gNato il@49gEsclusione@63gMotivo");
|
set_header(4,"@0gCodice@9gC.@12gCognome e nome@38gNato il@49gEsclusione@63gMotivo");
|
||||||
set_header(5,"@49gTipo Termine");
|
set_header(5,"@49gTipo Termine");
|
||||||
set_header(6,"@0g--------@9g--@12g-------------------------@38g----------@49g-------------@63g------------------------------");
|
set_header(6,"@0g--------@9g--@12g-------------------------@38g----------@49g-------------@63g------------------------------");
|
||||||
|
printer().footerlen(3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ class TStampaModificati : public TPrintapp
|
|||||||
TString16 _codsez, _codsot, _utente;
|
TString16 _codsez, _codsot, _utente;
|
||||||
TString80 _eledon;
|
TString80 _eledon;
|
||||||
TString80 _eleben1,_eleben2;
|
TString80 _eleben1,_eleben2;
|
||||||
int _lenpage, _schxpag;
|
int _lenpage, _schxpag, _totale, _contatore;
|
||||||
TString16 _schformato;
|
TString16 _schformato;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -73,6 +73,8 @@ public:
|
|||||||
void crea_intestazione();
|
void crea_intestazione();
|
||||||
void filtra_sezioni();
|
void filtra_sezioni();
|
||||||
void header_sezione(const TString16 codsez, const TString16 codsot);
|
void header_sezione(const TString16 codsez, const TString16 codsot);
|
||||||
|
void footer_sezione();
|
||||||
|
void fine_stampa();
|
||||||
TMask& app_mask() { return *_msk; }
|
TMask& app_mask() { return *_msk; }
|
||||||
|
|
||||||
TStampaModificati() : _data_stampa(TODAY), _cognome_nome("",25), _dencom("",50) {}
|
TStampaModificati() : _data_stampa(TODAY), _cognome_nome("",25), _dencom("",50) {}
|
||||||
@ -89,7 +91,11 @@ print_action TStampaModificati::postprocess_print(int file, int counter)
|
|||||||
if ((_tipostampa == schede) && (_schxpag > 1))
|
if ((_tipostampa == schede) && (_schxpag > 1))
|
||||||
printer().formlen(_lenpage);
|
printer().formlen(_lenpage);
|
||||||
else
|
else
|
||||||
printer().formfeed();
|
{
|
||||||
|
if (_contatore > 0)
|
||||||
|
footer_sezione();
|
||||||
|
fine_stampa();
|
||||||
|
}
|
||||||
return NEXT_PAGE;
|
return NEXT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,6 +118,39 @@ void TStampaModificati::filtra_sezioni()
|
|||||||
current_cursor()->setregion(da, a);
|
current_cursor()->setregion(da, a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TStampaModificati::footer_sezione()
|
||||||
|
{
|
||||||
|
// stampa totale soggetti appartenenti alla sezione
|
||||||
|
if (_tipostampa==elenco)
|
||||||
|
{
|
||||||
|
reset_footer();
|
||||||
|
TString sep(80);
|
||||||
|
sep.fill('-');
|
||||||
|
set_footer(2, (const char *) sep);
|
||||||
|
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _contatore);
|
||||||
|
printer().formfeed();
|
||||||
|
reset_footer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TStampaModificati::fine_stampa()
|
||||||
|
{
|
||||||
|
// stampa totale soggetti a fine stampa
|
||||||
|
if (_tipostampa==elenco)
|
||||||
|
{
|
||||||
|
reset_footer();
|
||||||
|
TString sep(80);
|
||||||
|
sep.fill('-');
|
||||||
|
set_footer(2, (const char *) sep);
|
||||||
|
if (_totale > 0 && _totale != _contatore)
|
||||||
|
{
|
||||||
|
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _totale);
|
||||||
|
printer().formfeed();
|
||||||
|
}
|
||||||
|
reset_footer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void TStampaModificati::set_page(int file, int cnt)
|
void TStampaModificati::set_page(int file, int cnt)
|
||||||
{
|
{
|
||||||
switch (_tipostampa)
|
switch (_tipostampa)
|
||||||
@ -199,11 +238,14 @@ bool TStampaModificati::preprocess_page(int file, int counter)
|
|||||||
if ((_codsez!=codsez)||(_codsot!=codsot))
|
if ((_codsez!=codsez)||(_codsot!=codsot))
|
||||||
{
|
{
|
||||||
if (_codsez != "**")
|
if (_codsez != "**")
|
||||||
printer().formfeed();
|
footer_sezione();
|
||||||
|
_contatore = 0;
|
||||||
_codsez = codsez;
|
_codsez = codsez;
|
||||||
_codsot = codsot;
|
_codsot = codsot;
|
||||||
header_sezione(codsez, codsot);
|
header_sezione(codsez, codsot);
|
||||||
}
|
}
|
||||||
|
_contatore++;
|
||||||
|
_totale++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -240,7 +282,7 @@ void TStampaModificati::header_sezione(const TString16 codsez, const TString16 c
|
|||||||
intestazione << codsot;
|
intestazione << codsot;
|
||||||
intestazione << " ";
|
intestazione << " ";
|
||||||
intestazione << densez;
|
intestazione << densez;
|
||||||
if ((densot.ok())&& (densot.not_empty()))
|
if (densot.not_empty())
|
||||||
{
|
{
|
||||||
intestazione << "/";
|
intestazione << "/";
|
||||||
intestazione << densot;
|
intestazione << densot;
|
||||||
@ -262,6 +304,8 @@ bool TStampaModificati::set_print(int)
|
|||||||
_tipostampa = elenco;
|
_tipostampa = elenco;
|
||||||
_codsez = "**";
|
_codsez = "**";
|
||||||
_codsez = "**";
|
_codsez = "**";
|
||||||
|
_totale = 0;
|
||||||
|
_contatore = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case F_SCHEDE:
|
case F_SCHEDE:
|
||||||
@ -288,20 +332,21 @@ bool TStampaModificati::set_print(int)
|
|||||||
const TString16 catqua = _msk->get(F_CAT4);
|
const TString16 catqua = _msk->get(F_CAT4);
|
||||||
const TString16 catqui = _msk->get(F_CAT5);
|
const TString16 catqui = _msk->get(F_CAT5);
|
||||||
const TString16 catses = _msk->get(F_CAT6);
|
const TString16 catses = _msk->get(F_CAT6);
|
||||||
if (catpri.not_empty() && catpri.ok())
|
if (catpri.not_empty())
|
||||||
_categorie.add((const char*) catpri);
|
_categorie.add((const char*) catpri);
|
||||||
if (catsec.not_empty() && catsec.ok())
|
if (catsec.not_empty())
|
||||||
_categorie.add((const char*) catsec);
|
_categorie.add((const char*) catsec);
|
||||||
if (catter.not_empty() && catter.ok())
|
if (catter.not_empty())
|
||||||
_categorie.add((const char*) catter);
|
_categorie.add((const char*) catter);
|
||||||
if (catqua.not_empty() && catqua.ok())
|
if (catqua.not_empty())
|
||||||
_categorie.add((const char*) catqua);
|
_categorie.add((const char*) catqua);
|
||||||
if (catqui.not_empty() && catqui.ok())
|
if (catqui.not_empty())
|
||||||
_categorie.add((const char*) catqui);
|
_categorie.add((const char*) catqui);
|
||||||
if (catses.not_empty() && catses.ok())
|
if (catses.not_empty())
|
||||||
_categorie.add((const char*) catses);
|
_categorie.add((const char*) catses);
|
||||||
current_cursor()->set_filterfunction(filter_func_modificati);
|
current_cursor()->set_filterfunction(filter_func_modificati);
|
||||||
reset_print();
|
reset_print();
|
||||||
|
printer().footerlen(0);
|
||||||
crea_intestazione();
|
crea_intestazione();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -345,6 +390,7 @@ void TStampaModificati::crea_intestazione()
|
|||||||
set_header(4,"@0gCodice@9gC.@12gCognome e nome@38gNato il@49gIndirizzo@100gTelefono abit.@116gTelefono lavoro");
|
set_header(4,"@0gCodice@9gC.@12gCognome e nome@38gNato il@49gIndirizzo@100gTelefono abit.@116gTelefono lavoro");
|
||||||
set_header(5,"@0gTessera@49gCAP/Località/Comune/Prov.@116gTelefono altro");
|
set_header(5,"@0gTessera@49gCAP/Località/Comune/Prov.@116gTelefono altro");
|
||||||
set_header(6,"@0g--------@9g--@12g-------------------------@38g----------@49g--------------------------------------------------@100g---------------@116g---------------");
|
set_header(6,"@0g--------@9g--@12g-------------------------@38g----------@49g--------------------------------------------------@100g---------------@116g---------------");
|
||||||
|
printer().footerlen(3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ class TStampaIscritti : public TPrintapp
|
|||||||
TParagraph_string _cognome_nome;
|
TParagraph_string _cognome_nome;
|
||||||
TDate _data_stampa;
|
TDate _data_stampa;
|
||||||
ts _tipostampa;
|
ts _tipostampa;
|
||||||
int _contatore;
|
int _contatore, _totale;
|
||||||
TString16 _codsez, _codsot;
|
TString16 _codsez, _codsot;
|
||||||
char _tipo_iscdim; // iscritti o dimessi
|
char _tipo_iscdim; // iscritti o dimessi
|
||||||
TDate _dataini, _datafin;
|
TDate _dataini, _datafin;
|
||||||
@ -60,6 +60,7 @@ public:
|
|||||||
void filtra_sezioni();
|
void filtra_sezioni();
|
||||||
void header_sezione(const TString16 codsez, const TString16 codsot);
|
void header_sezione(const TString16 codsez, const TString16 codsot);
|
||||||
void footer_sezione();
|
void footer_sezione();
|
||||||
|
void fine_stampa();
|
||||||
TMask& app_mask() { return *_msk; }
|
TMask& app_mask() { return *_msk; }
|
||||||
TStampaIscritti() : _data_stampa(TODAY), _cognome_nome("",25) {}
|
TStampaIscritti() : _data_stampa(TODAY), _cognome_nome("",25) {}
|
||||||
};
|
};
|
||||||
@ -192,7 +193,8 @@ bool TStampaIscritti::preprocess_page(int file, int counter)
|
|||||||
if (_tipostampa==etichette)
|
if (_tipostampa==etichette)
|
||||||
if (printer().rows_left() < _form_eti->get_body().height())
|
if (printer().rows_left() < _form_eti->get_body().height())
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
_contatore++;
|
_contatore++;
|
||||||
|
_totale++;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,19 +202,41 @@ print_action TStampaIscritti::postprocess_print(int file, int counter)
|
|||||||
{
|
{
|
||||||
if (_contatore > 0)
|
if (_contatore > 0)
|
||||||
footer_sezione();
|
footer_sezione();
|
||||||
|
fine_stampa();
|
||||||
return NEXT_PAGE;
|
return NEXT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TStampaIscritti::footer_sezione()
|
void TStampaIscritti::footer_sezione()
|
||||||
{
|
{
|
||||||
// stampa totale soggetti appartenenti alla sezione
|
// stampa totale soggetti appartenenti alla sezione
|
||||||
reset_footer();
|
if (_tipostampa==elenco)
|
||||||
TString sep(80);
|
{
|
||||||
sep.fill('-');
|
reset_footer();
|
||||||
set_footer(2, (const char *) sep);
|
TString sep(80);
|
||||||
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _contatore);
|
sep.fill('-');
|
||||||
printer().formfeed();
|
set_footer(2, (const char *) sep);
|
||||||
reset_footer();
|
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _contatore);
|
||||||
|
printer().formfeed();
|
||||||
|
reset_footer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TStampaIscritti::fine_stampa()
|
||||||
|
{
|
||||||
|
// stampa totale soggetti a fine stampa
|
||||||
|
if (_tipostampa==elenco)
|
||||||
|
{
|
||||||
|
reset_footer();
|
||||||
|
TString sep(80);
|
||||||
|
sep.fill('-');
|
||||||
|
set_footer(2, (const char *) sep);
|
||||||
|
if (_totale > 0 && _totale != _contatore)
|
||||||
|
{
|
||||||
|
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _totale);
|
||||||
|
printer().formfeed();
|
||||||
|
}
|
||||||
|
reset_footer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TStampaIscritti::header_sezione(const TString16 codsez, const TString16 codsot)
|
void TStampaIscritti::header_sezione(const TString16 codsez, const TString16 codsot)
|
||||||
@ -226,7 +250,7 @@ void TStampaIscritti::header_sezione(const TString16 codsez, const TString16 cod
|
|||||||
intestazione << codsot;
|
intestazione << codsot;
|
||||||
intestazione << " ";
|
intestazione << " ";
|
||||||
intestazione << densez;
|
intestazione << densez;
|
||||||
if ((densot.ok())&& (densot.not_empty()))
|
if (densot.not_empty())
|
||||||
{
|
{
|
||||||
intestazione << "/";
|
intestazione << "/";
|
||||||
intestazione << densot;
|
intestazione << densot;
|
||||||
@ -251,6 +275,7 @@ bool TStampaIscritti::set_print(int m)
|
|||||||
_codsez = "**";
|
_codsez = "**";
|
||||||
_codsot = "**";
|
_codsot = "**";
|
||||||
_contatore = 0;
|
_contatore = 0;
|
||||||
|
_totale = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case F_ETICHETTE:
|
case F_ETICHETTE:
|
||||||
@ -271,17 +296,17 @@ bool TStampaIscritti::set_print(int m)
|
|||||||
const TString16 catqua = _msk->get(F_CAT4);
|
const TString16 catqua = _msk->get(F_CAT4);
|
||||||
const TString16 catqui = _msk->get(F_CAT5);
|
const TString16 catqui = _msk->get(F_CAT5);
|
||||||
const TString16 catses = _msk->get(F_CAT6);
|
const TString16 catses = _msk->get(F_CAT6);
|
||||||
if (catpri.not_empty() && catpri.ok())
|
if (catpri.not_empty())
|
||||||
_categorie.add((const char*) catpri);
|
_categorie.add((const char*) catpri);
|
||||||
if (catsec.not_empty() && catsec.ok())
|
if (catsec.not_empty())
|
||||||
_categorie.add((const char*) catsec);
|
_categorie.add((const char*) catsec);
|
||||||
if (catter.not_empty() && catter.ok())
|
if (catter.not_empty())
|
||||||
_categorie.add((const char*) catter);
|
_categorie.add((const char*) catter);
|
||||||
if (catqua.not_empty() && catqua.ok())
|
if (catqua.not_empty())
|
||||||
_categorie.add((const char*) catqua);
|
_categorie.add((const char*) catqua);
|
||||||
if (catqui.not_empty() && catqui.ok())
|
if (catqui.not_empty())
|
||||||
_categorie.add((const char*) catqui);
|
_categorie.add((const char*) catqui);
|
||||||
if (catses.not_empty() && catses.ok())
|
if (catses.not_empty())
|
||||||
_categorie.add((const char*) catses);
|
_categorie.add((const char*) catses);
|
||||||
// filtro per iscritti/dimessi e date
|
// filtro per iscritti/dimessi e date
|
||||||
_tipo_iscdim = _msk->get(F_TIPO)[0];
|
_tipo_iscdim = _msk->get(F_TIPO)[0];
|
||||||
|
@ -39,7 +39,7 @@ class TStampaNonDon : public TPrintapp
|
|||||||
TEti_nondon_form* _form_eti;
|
TEti_nondon_form* _form_eti;
|
||||||
TAssoc_array _categorie;
|
TAssoc_array _categorie;
|
||||||
int _cur;
|
int _cur;
|
||||||
int _contatore;
|
int _contatore, _totale;
|
||||||
TParagraph_string _cognome_nome, _dencom;
|
TParagraph_string _cognome_nome, _dencom;
|
||||||
TDate _data_stampa;
|
TDate _data_stampa;
|
||||||
TDate _data,_data2;
|
TDate _data,_data2;
|
||||||
@ -61,6 +61,7 @@ public:
|
|||||||
void filtra_sezioni();
|
void filtra_sezioni();
|
||||||
void header_sezione(const TString16 codsez, const TString16 codsot);
|
void header_sezione(const TString16 codsez, const TString16 codsot);
|
||||||
void footer_sezione();
|
void footer_sezione();
|
||||||
|
void fine_stampa();
|
||||||
TMask& app_mask() { return *_msk; }
|
TMask& app_mask() { return *_msk; }
|
||||||
|
|
||||||
TStampaNonDon() : _data_stampa(TODAY), _cognome_nome("",25), _dencom("",50) {}
|
TStampaNonDon() : _data_stampa(TODAY), _cognome_nome("",25), _dencom("",50) {}
|
||||||
@ -216,7 +217,7 @@ void TStampaNonDon::header_sezione(const TString16 codsez, const TString16 codso
|
|||||||
intestazione << codsot;
|
intestazione << codsot;
|
||||||
intestazione << " ";
|
intestazione << " ";
|
||||||
intestazione << densez;
|
intestazione << densez;
|
||||||
if ((densot.ok())&& (densot.not_empty()))
|
if (densot.not_empty())
|
||||||
{
|
{
|
||||||
intestazione << "/";
|
intestazione << "/";
|
||||||
intestazione << densot;
|
intestazione << densot;
|
||||||
@ -232,13 +233,34 @@ void TStampaNonDon::header_sezione(const TString16 codsez, const TString16 codso
|
|||||||
void TStampaNonDon::footer_sezione()
|
void TStampaNonDon::footer_sezione()
|
||||||
{
|
{
|
||||||
// stampa totale soggetti appartenenti alla sezione
|
// stampa totale soggetti appartenenti alla sezione
|
||||||
reset_footer();
|
if (_tipostampa==elenco)
|
||||||
TString sep(80);
|
{
|
||||||
sep.fill('-');
|
reset_footer();
|
||||||
set_footer(2, (const char *) sep);
|
TString sep(80);
|
||||||
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _contatore);
|
sep.fill('-');
|
||||||
printer().formfeed();
|
set_footer(2, (const char *) sep);
|
||||||
reset_footer();
|
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _contatore);
|
||||||
|
printer().formfeed();
|
||||||
|
reset_footer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TStampaNonDon::fine_stampa()
|
||||||
|
{
|
||||||
|
// stampa totale soggetti a fine stampa
|
||||||
|
if (_tipostampa==elenco)
|
||||||
|
{
|
||||||
|
reset_footer();
|
||||||
|
TString sep(80);
|
||||||
|
sep.fill('-');
|
||||||
|
set_footer(2, (const char *) sep);
|
||||||
|
if (_totale > 0 && _totale != _contatore)
|
||||||
|
{
|
||||||
|
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _totale);
|
||||||
|
printer().formfeed();
|
||||||
|
}
|
||||||
|
reset_footer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TStampaNonDon::preprocess_page(int file, int counter)
|
bool TStampaNonDon::preprocess_page(int file, int counter)
|
||||||
@ -282,6 +304,7 @@ bool TStampaNonDon::preprocess_page(int file, int counter)
|
|||||||
if (printer().rows_left() < _form_eti->get_body().height())
|
if (printer().rows_left() < _form_eti->get_body().height())
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
_contatore++;
|
_contatore++;
|
||||||
|
_totale++;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -289,6 +312,7 @@ print_action TStampaNonDon::postprocess_print(int file, int counter)
|
|||||||
{
|
{
|
||||||
if (_contatore > 0)
|
if (_contatore > 0)
|
||||||
footer_sezione();
|
footer_sezione();
|
||||||
|
fine_stampa();
|
||||||
return NEXT_PAGE;
|
return NEXT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -306,6 +330,8 @@ bool TStampaNonDon::set_print(int m)
|
|||||||
_tipostampa = elenco;
|
_tipostampa = elenco;
|
||||||
_codsez = "**";
|
_codsez = "**";
|
||||||
_codsot = "**";
|
_codsot = "**";
|
||||||
|
_contatore = 0;
|
||||||
|
_totale = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case F_ETICHETTE:
|
case F_ETICHETTE:
|
||||||
@ -314,7 +340,6 @@ bool TStampaNonDon::set_print(int m)
|
|||||||
}
|
}
|
||||||
if (_tipostampa != undefined)
|
if (_tipostampa != undefined)
|
||||||
{
|
{
|
||||||
_contatore = 0;
|
|
||||||
reset_files();
|
reset_files();
|
||||||
add_file(LF_SOGGETTI);
|
add_file(LF_SOGGETTI);
|
||||||
filtra_sezioni();
|
filtra_sezioni();
|
||||||
@ -332,17 +357,17 @@ bool TStampaNonDon::set_print(int m)
|
|||||||
const TString16 catqua = _msk->get(F_CAT4);
|
const TString16 catqua = _msk->get(F_CAT4);
|
||||||
const TString16 catqui = _msk->get(F_CAT5);
|
const TString16 catqui = _msk->get(F_CAT5);
|
||||||
const TString16 catses = _msk->get(F_CAT6);
|
const TString16 catses = _msk->get(F_CAT6);
|
||||||
if (catpri.not_empty() && catpri.ok())
|
if (catpri.not_empty())
|
||||||
_categorie.add((const char*) catpri);
|
_categorie.add((const char*) catpri);
|
||||||
if (catsec.not_empty() && catsec.ok())
|
if (catsec.not_empty())
|
||||||
_categorie.add((const char*) catsec);
|
_categorie.add((const char*) catsec);
|
||||||
if (catter.not_empty() && catter.ok())
|
if (catter.not_empty())
|
||||||
_categorie.add((const char*) catter);
|
_categorie.add((const char*) catter);
|
||||||
if (catqua.not_empty() && catqua.ok())
|
if (catqua.not_empty())
|
||||||
_categorie.add((const char*) catqua);
|
_categorie.add((const char*) catqua);
|
||||||
if (catqui.not_empty() && catqui.ok())
|
if (catqui.not_empty())
|
||||||
_categorie.add((const char*) catqui);
|
_categorie.add((const char*) catqui);
|
||||||
if (catses.not_empty() && catses.ok())
|
if (catses.not_empty())
|
||||||
_categorie.add((const char*) catses);
|
_categorie.add((const char*) catses);
|
||||||
current_cursor()->set_filterfunction (filter_func_nondon);
|
current_cursor()->set_filterfunction (filter_func_nondon);
|
||||||
reset_print();
|
reset_print();
|
||||||
@ -358,13 +383,13 @@ void TStampaNonDon::crea_intestazione()
|
|||||||
reset_header();
|
reset_header();
|
||||||
if (_tipostampa == elenco)
|
if (_tipostampa == elenco)
|
||||||
{
|
{
|
||||||
printer().footerlen(5);
|
printer().footerlen(3);
|
||||||
TString sep(132);
|
TString sep(132);
|
||||||
sep = "SOGGETTI CHE NON DONANO DAL ";
|
sep = "NON DONANO DAL ";
|
||||||
if (_data.ok())
|
if (_data.ok())
|
||||||
sep << _data.string();
|
sep << _data.string();
|
||||||
if (_data2.ok())
|
if (_data2.ok())
|
||||||
sep << " MA CON ULT.DON. NON PRECEDENTE AL " << _data2.string();
|
sep << " ULT.DON. NON PRIMA DEL " << _data2.string();
|
||||||
if (_stampa80)
|
if (_stampa80)
|
||||||
sep.center_just(80);
|
sep.center_just(80);
|
||||||
else
|
else
|
||||||
|
@ -52,7 +52,7 @@ class TFrequenza : public TPrintapp
|
|||||||
TString16 _codsez, _codsot;
|
TString16 _codsez, _codsot;
|
||||||
int _etlarghezza, _etcolonne;
|
int _etlarghezza, _etcolonne;
|
||||||
bool _stampa80, _ctrltotale;
|
bool _stampa80, _ctrltotale;
|
||||||
int _contatore;
|
int _contatore, _totale;
|
||||||
char _condizione;
|
char _condizione;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -68,6 +68,7 @@ public:
|
|||||||
void filtra_sezioni();
|
void filtra_sezioni();
|
||||||
void header_sezione(const TString16 codsez, const TString16 codsot);
|
void header_sezione(const TString16 codsez, const TString16 codsot);
|
||||||
void footer_sezione();
|
void footer_sezione();
|
||||||
|
void fine_stampa();
|
||||||
TMask& app_mask() { return *_msk; }
|
TMask& app_mask() { return *_msk; }
|
||||||
TFrequenza() : _data_stampa(TODAY), _cognome_nome("",25), _dencom("",50), _numdonsog("",5), _dataultdon("",10) {}
|
TFrequenza() : _data_stampa(TODAY), _cognome_nome("",25), _dencom("",50), _numdonsog("",5), _dataultdon("",10) {}
|
||||||
};
|
};
|
||||||
@ -229,7 +230,7 @@ void TFrequenza::header_sezione(const TString16 codsez, const TString16 codsot)
|
|||||||
intestazione << codsot;
|
intestazione << codsot;
|
||||||
intestazione << " ";
|
intestazione << " ";
|
||||||
intestazione << densez;
|
intestazione << densez;
|
||||||
if ((densot.ok())&& (densot.not_empty()))
|
if (densot.not_empty())
|
||||||
{
|
{
|
||||||
intestazione << "/";
|
intestazione << "/";
|
||||||
intestazione << densot;
|
intestazione << densot;
|
||||||
@ -313,7 +314,8 @@ bool TFrequenza::preprocess_page(int file, int counter)
|
|||||||
if (_tipostampa==etichette)
|
if (_tipostampa==etichette)
|
||||||
if (printer().rows_left() < _form_eti->get_body().height())
|
if (printer().rows_left() < _form_eti->get_body().height())
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
_contatore++;
|
_contatore++;
|
||||||
|
_totale++;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -321,19 +323,41 @@ print_action TFrequenza::postprocess_print(int file, int counter)
|
|||||||
{
|
{
|
||||||
if (_contatore > 0)
|
if (_contatore > 0)
|
||||||
footer_sezione();
|
footer_sezione();
|
||||||
|
fine_stampa();
|
||||||
return NEXT_PAGE;
|
return NEXT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TFrequenza::footer_sezione()
|
void TFrequenza::footer_sezione()
|
||||||
{
|
{
|
||||||
// stampa totale soggetti appartenenti alla sezione
|
// stampa totale soggetti appartenenti alla sezione
|
||||||
reset_footer();
|
if (_tipostampa==elenco)
|
||||||
TString sep(80);
|
{
|
||||||
sep.fill('-');
|
reset_footer();
|
||||||
set_footer(2, (const char *) sep);
|
TString sep(80);
|
||||||
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _contatore);
|
sep.fill('-');
|
||||||
printer().formfeed();
|
set_footer(2, (const char *) sep);
|
||||||
reset_footer();
|
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _contatore);
|
||||||
|
printer().formfeed();
|
||||||
|
reset_footer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TFrequenza::fine_stampa()
|
||||||
|
{
|
||||||
|
// stampa totale soggetti a fine stampa
|
||||||
|
if (_tipostampa==elenco)
|
||||||
|
{
|
||||||
|
reset_footer();
|
||||||
|
TString sep(80);
|
||||||
|
sep.fill('-');
|
||||||
|
set_footer(2, (const char *) sep);
|
||||||
|
if (_totale > 0 && _totale != _contatore)
|
||||||
|
{
|
||||||
|
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _totale);
|
||||||
|
printer().formfeed();
|
||||||
|
}
|
||||||
|
reset_footer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TFrequenza::set_print(int m)
|
bool TFrequenza::set_print(int m)
|
||||||
@ -350,6 +374,8 @@ bool TFrequenza::set_print(int m)
|
|||||||
_tipostampa = elenco;
|
_tipostampa = elenco;
|
||||||
_codsez = "**";
|
_codsez = "**";
|
||||||
_codsot = "**";
|
_codsot = "**";
|
||||||
|
_contatore = 0;
|
||||||
|
_totale = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case F_ETICHETTE:
|
case F_ETICHETTE:
|
||||||
@ -377,17 +403,17 @@ bool TFrequenza::set_print(int m)
|
|||||||
const TString16 catqua = _msk->get(F_CAT4);
|
const TString16 catqua = _msk->get(F_CAT4);
|
||||||
const TString16 catqui = _msk->get(F_CAT5);
|
const TString16 catqui = _msk->get(F_CAT5);
|
||||||
const TString16 catses = _msk->get(F_CAT6);
|
const TString16 catses = _msk->get(F_CAT6);
|
||||||
if (catpri.not_empty() && catpri.ok())
|
if (catpri.not_empty())
|
||||||
_categorie.add((const char*) catpri);
|
_categorie.add((const char*) catpri);
|
||||||
if (catsec.not_empty() && catsec.ok())
|
if (catsec.not_empty())
|
||||||
_categorie.add((const char*) catsec);
|
_categorie.add((const char*) catsec);
|
||||||
if (catter.not_empty() && catter.ok())
|
if (catter.not_empty())
|
||||||
_categorie.add((const char*) catter);
|
_categorie.add((const char*) catter);
|
||||||
if (catqua.not_empty() && catqua.ok())
|
if (catqua.not_empty())
|
||||||
_categorie.add((const char*) catqua);
|
_categorie.add((const char*) catqua);
|
||||||
if (catqui.not_empty() && catqui.ok())
|
if (catqui.not_empty())
|
||||||
_categorie.add((const char*) catqui);
|
_categorie.add((const char*) catqui);
|
||||||
if (catses.not_empty() && catses.ok())
|
if (catses.not_empty())
|
||||||
_categorie.add((const char*) catses);
|
_categorie.add((const char*) catses);
|
||||||
current_cursor()->set_filterfunction (filter_func_freq);
|
current_cursor()->set_filterfunction (filter_func_freq);
|
||||||
reset_print();
|
reset_print();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user