Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : Stampa totale per sezione git-svn-id: svn://10.65.10.50/trunk@8968 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
02e5718a77
commit
d0289e8a9e
@ -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;
|
int _etlarghezza, _etcolonne, _contatore;
|
||||||
bool _motivi;
|
bool _motivi;
|
||||||
|
|
||||||
static bool filter_func_sospesi(const TRelation* rel);
|
static bool filter_func_sospesi(const TRelation* rel);
|
||||||
@ -61,6 +61,7 @@ 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();
|
||||||
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) {}
|
||||||
};
|
};
|
||||||
@ -269,7 +270,8 @@ bool TStampaSospesi::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);
|
||||||
@ -278,12 +280,14 @@ bool TStampaSospesi::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++;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
print_action TStampaSospesi::postprocess_print(int file, int counter)
|
print_action TStampaSospesi::postprocess_print(int file, int counter)
|
||||||
{
|
{
|
||||||
printer().formfeed();
|
if (_contatore > 0)
|
||||||
|
footer_sezione();
|
||||||
return NEXT_PAGE;
|
return NEXT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,6 +318,21 @@ void TStampaSospesi::header_sezione(const TString16 codsez, const TString16 cods
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TStampaSospesi::footer_sezione()
|
||||||
|
{
|
||||||
|
// stampa totale soggetti appartenenti alla sezione
|
||||||
|
if (_tipostampa==sintetico || _tipostampa==completo)
|
||||||
|
{
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool TStampaSospesi::set_print(int m)
|
bool TStampaSospesi::set_print(int m)
|
||||||
{
|
{
|
||||||
TPrinter& p = printer();
|
TPrinter& p = printer();
|
||||||
@ -327,12 +346,14 @@ bool TStampaSospesi::set_print(int m)
|
|||||||
{
|
{
|
||||||
_tipostampa = sintetico;
|
_tipostampa = sintetico;
|
||||||
_codsez = _codsot = "**";
|
_codsez = _codsot = "**";
|
||||||
|
_contatore = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case F_COMPLETO:
|
case F_COMPLETO:
|
||||||
{
|
{
|
||||||
_tipostampa = completo;
|
_tipostampa = completo;
|
||||||
_codsez = _codsot = "**";
|
_codsez = _codsot = "**";
|
||||||
|
_contatore = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case F_ETICHETTE:
|
case F_ETICHETTE:
|
||||||
@ -391,6 +412,7 @@ bool TStampaSospesi::set_print(int m)
|
|||||||
_sodatafin = _msk->get_date(F_SODATAFIN);
|
_sodatafin = _msk->get_date(F_SODATAFIN);
|
||||||
current_cursor()->set_filterfunction(filter_func_sospesi);
|
current_cursor()->set_filterfunction(filter_func_sospesi);
|
||||||
reset_print();
|
reset_print();
|
||||||
|
printer().footerlen(0);
|
||||||
crea_intestazione();
|
crea_intestazione();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -462,6 +484,7 @@ void TStampaSospesi::crea_intestazione()
|
|||||||
set_header(9,"@94gMotivo@109gInt.AF");
|
set_header(9,"@94gMotivo@109gInt.AF");
|
||||||
set_header(10,"@0g--------@9g-------------------------@35g------------------------------@66g--------------@82g------------@94g----------@105g----------@116g----------");
|
set_header(10,"@0g--------@9g-------------------------@35g------------------------------@66g--------------@82g------------@94g----------@105g----------@116g----------");
|
||||||
}
|
}
|
||||||
|
printer().footerlen(3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user