Patch level : 2.0 boh patch
Files correlati : cm0.exe Ricompilazione Demo : [ ] Commento : Aggiunto supporto per footer in personalizzazioni (Tampalini) git-svn-id: svn://10.65.10.50/trunk@11629 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
85ea466cfe
commit
3001744c53
@ -21,8 +21,8 @@ public:
|
||||
void set_testata() { set_header(1,TRUE); }
|
||||
TPrint_section& get_body() { return section('B', odd_page); }
|
||||
TPrint_section& get_section(char s, pagetype pos) { return section(s, pos); }
|
||||
TForm_contixcdc();
|
||||
|
||||
TForm_contixcdc();
|
||||
virtual ~TForm_contixcdc();
|
||||
};
|
||||
|
||||
@ -183,6 +183,7 @@ protected:
|
||||
void print_header_cms();
|
||||
void print_footer_fsc();
|
||||
void print_header_fsc();
|
||||
void print_footer_last();
|
||||
void set_intestazione();
|
||||
void fill_importo(const TImporto& imp, short id_imp, short id_sez);
|
||||
void fill_body(const TTotali& tot); //riempie il campo body con tutti i totali
|
||||
@ -251,11 +252,10 @@ void TContixCdc::print_footer_gruppo()
|
||||
key.format("%d|%d", _oldgruppo, _oldconto);
|
||||
TString tmp;
|
||||
const TRectype& pcon = cache().get(LF_PCON, key);
|
||||
tmp.format("TOTALE %d %d %s", _oldgruppo, _oldconto, (const char*) pcon.get(PCN_DESCR));
|
||||
set_field(FR_GRUPPO, _oldgruppo);
|
||||
set_field(FR_CONTO, _oldconto);
|
||||
set_field(FR_SOTTOC, "");
|
||||
set_field(FR_D_SOTTOC, tmp);
|
||||
set_field(FR_D_SOTTOC, pcon.get(PCN_DESCR));
|
||||
fill_body(_t_gruppo);
|
||||
print_body();
|
||||
}
|
||||
@ -299,6 +299,23 @@ void TContixCdc::print_footer_fsc()
|
||||
_headerfsc = TRUE;
|
||||
}
|
||||
|
||||
void TContixCdc::print_footer_last()
|
||||
{
|
||||
TPrinter& pr = printer();
|
||||
TPrint_section& f = _form->get_section('F', last_page);
|
||||
if (f.fields() > 0)
|
||||
{
|
||||
f.update();
|
||||
if (f.height() > pr.rows_left())
|
||||
pr.formfeed();
|
||||
|
||||
pr.footerlen(f.height());
|
||||
for (word i = 0; i < f.height(); i++)
|
||||
pr.setfooterline(i, f.row(i));
|
||||
}
|
||||
pr.formfeed();
|
||||
}
|
||||
|
||||
void TContixCdc::print_header_cms()
|
||||
{
|
||||
_form->find_field('H', odd_page, FR_CMS).set(_oldcms);
|
||||
@ -324,6 +341,9 @@ void TContixCdc::set_intestazione()
|
||||
_form->find_field('H', first_page, FR_ACDC).set(_mask->get(F_ACDC));
|
||||
_form->find_field('H', first_page, FR_AFSC).set(_mask->get(F_AFSC));
|
||||
_form->set_testata();
|
||||
|
||||
printer().footerlen(0);
|
||||
printer().resetfooter();
|
||||
}
|
||||
|
||||
void TContixCdc::print_body()
|
||||
@ -522,7 +542,7 @@ void TContixCdc::main_loop()
|
||||
if (ctrlfsc)
|
||||
print_footer_fsc();
|
||||
print_footer_cms();
|
||||
printer().formfeed();
|
||||
print_footer_last();
|
||||
}
|
||||
printer().close();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user