From b7f7d0c8f94b66b29f5d513e3a459b21d77b0e03 Mon Sep 17 00:00:00 2001 From: angelo Date: Thu, 26 Sep 1996 07:37:29 +0000 Subject: [PATCH] Corretto errore 006221. git-svn-id: svn://10.65.10.50/trunk@3658 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ba/ba6100.cpp | 9 +++++++++ ba/ba6100.h | 2 ++ ba/ba6101.cpp | 17 +++++++++++++++-- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/ba/ba6100.cpp b/ba/ba6100.cpp index 7bb54b8ca..9b8ef08f6 100755 --- a/ba/ba6100.cpp +++ b/ba/ba6100.cpp @@ -136,6 +136,14 @@ bool TAnaprint_app::preprocess_page(int file, int counter) return TRUE; } +print_action TAnaprint_app::postprocess_page(int file, int counter) +{ + const int cur = printer().current_row(); + if (file == LF_ANAG && _pr_type == schede && _inclditte) + printer().formfeed(); + return NEXT_PAGE; +} + bool mask_reset_fields(TMask_field& mf, KEY k) { @@ -264,6 +272,7 @@ void TAnaprint_app::init_print() } } set_headers(); + set_footers(); } bool TAnaprint_app::set_print(int) diff --git a/ba/ba6100.h b/ba/ba6100.h index b6350abe2..bbcf23933 100755 --- a/ba/ba6100.h +++ b/ba/ba6100.h @@ -53,6 +53,7 @@ protected: virtual void set_page(int file, int cnt); virtual bool preprocess_page(int file, int counter); + virtual print_action postprocess_page(int file, int counter); virtual bool user_create(); virtual bool user_destroy(); virtual bool set_print(int n); @@ -83,6 +84,7 @@ public: void set_schede(); void set_etichette(); void set_headers(); + void set_footers(); const char* get_field(int ln, const char* fn) { return current_cursor()->curr(ln).get(fn); } diff --git a/ba/ba6101.cpp b/ba/ba6101.cpp index 24de4db18..778bc98b0 100755 --- a/ba/ba6101.cpp +++ b/ba/ba6101.cpp @@ -205,7 +205,8 @@ void TAnaprint_app::set_scheda_anagiu() set_row(62,"@6g@70s",FLD(LF_ANAGGIU,"NOTE4")); set_row(63,"@6g@70s",FLD(LF_ANAGGIU,"NOTE5")); - for (int i = 64; i <= printer().formlen(); i++) + const int l = printer().rows(); + for (int i = 64; i <= l; i++) set_row(i, ""); } @@ -401,7 +402,8 @@ void TAnaprint_app::set_scheda_anafis() set_row(49,"@20gSigla stat.3 @7s %s", FLD(LF_ANAG,"CODSTAT3"), (const char*)a); - for (int i = 50; i <= printer().formlen(); i++) + const int l = printer().rows(); + for (int i = 50; i <= l; i++) set_row(i, ""); } @@ -896,6 +898,7 @@ void TAnaprint_app::set_headers() "@61gRagione sociale/Cognome e nome"); set_header(6,""); } + printer().headerlen(6); } else if (_pr_type == rubriche) { @@ -926,13 +929,23 @@ void TAnaprint_app::set_headers() set_header(5,""); break; } + printer().headerlen(5); } else if (_pr_type == schede) { set_header(1,""); + printer().headerlen(1); } } +void TAnaprint_app::set_footers() +{ + reset_footer(); + if (_pr_type == schede && _inclditte) + printer().footerlen(1); + else + printer().footerlen(0); +} void TAnaprint_app::set_etichette() {