Il formato della scheda anagrafica e' preso dai parametri di sezione
Patch level : Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/trunk@6195 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ac18aa159e
commit
93a56ec04d
@ -58,6 +58,8 @@ class TStampaModificati : public TPrintapp
|
||||
TString16 _codsez, _codsot;
|
||||
TString80 _eledon;
|
||||
TString80 _eleben1,_eleben2;
|
||||
int _lenpage, _schxpag;
|
||||
TString16 _schformato;
|
||||
|
||||
protected:
|
||||
virtual bool user_create();
|
||||
@ -65,6 +67,7 @@ protected:
|
||||
virtual bool set_print(int m);
|
||||
virtual void set_page(int file, int cnt);
|
||||
virtual bool preprocess_page (int file, int counter);
|
||||
virtual print_action postprocess_print(int file, int counter);
|
||||
|
||||
public:
|
||||
void crea_intestazione();
|
||||
@ -81,6 +84,13 @@ TCursor* TModificati_form::cursor() const { return app().current_cursor(); }
|
||||
|
||||
TRelation* TModificati_form::relation() const { return cursor()->relation(); }
|
||||
|
||||
print_action TStampaModificati::postprocess_print(int file, int counter)
|
||||
{
|
||||
if ((_tipostampa == schede) && (_schxpag > 1))
|
||||
printer().formlen(_lenpage);
|
||||
return NEXT_PAGE;
|
||||
}
|
||||
|
||||
void TStampaModificati::filtra_sezioni()
|
||||
{
|
||||
const TString16 sezini = _msk->get(F_SEZINI);
|
||||
@ -242,10 +252,12 @@ bool TStampaModificati::set_print(int)
|
||||
_tipostampa = elenco;
|
||||
_codsez = "**";
|
||||
_codsez = "**";
|
||||
break;
|
||||
break;
|
||||
case F_SCHEDE:
|
||||
_tipostampa = schede;
|
||||
break;
|
||||
if (_schxpag > 1)
|
||||
printer().formlen(_lenpage/_schxpag);
|
||||
break;
|
||||
}
|
||||
if (_tipostampa != undefined)
|
||||
{
|
||||
@ -332,8 +344,12 @@ bool TStampaModificati::user_create()
|
||||
_sdonazioni = new TRecord_array(LF_DONAZ,DON_PROGDON);
|
||||
_sbenemerenze = new TRecord_array(LF_BENEM,BEN_PROGBEN);
|
||||
add_cursor(new TCursor(_rel, "", 3));
|
||||
_form_sch = new TModificati_form("AT_PAGIN");
|
||||
_msk = new TMask("at2400a");
|
||||
TConfig config(CONFIG_STUDIO);
|
||||
TString16 schformato = config.get("SchFormato");
|
||||
_schxpag = config.get_int("SchXPag");
|
||||
_form_sch = new TModificati_form(schformato);
|
||||
_lenpage = printer().formlen();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ class TStampaPerCategorie : public TPrintapp
|
||||
TString80 _invitoper, _data, _presso1, _presso2, _presso3, _presso4;
|
||||
TString80 _note, _intest1, _intest2, _intest3, _intest4;
|
||||
bool _usomodo, _usasez;
|
||||
int _etlarghezza, _etcolonne;
|
||||
int _etlarghezza, _etcolonne, _schxpag, _lenpage;
|
||||
bool _stampa80;
|
||||
|
||||
protected:
|
||||
@ -148,10 +148,6 @@ ts TStampaPerCategorie::dati_cartolina()
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void TStampaPerCategorie::filtra_sezioni()
|
||||
{
|
||||
const TString16 sezini = _msk->get(F_SEZINI);
|
||||
@ -192,6 +188,8 @@ print_action TStampaPerCategorie::postprocess_print(int file, int counter)
|
||||
else
|
||||
footer_sezione();
|
||||
}
|
||||
if ((_tipostampa == schede) && (_schxpag > 1))
|
||||
printer().formlen(_lenpage);
|
||||
return NEXT_PAGE;
|
||||
}
|
||||
|
||||
@ -559,6 +557,8 @@ bool TStampaPerCategorie::set_print(int m)
|
||||
break;
|
||||
case F_SCHEDE:
|
||||
_tipostampa=schede;
|
||||
if (_schxpag > 1)
|
||||
printer().formlen(_lenpage/_schxpag);
|
||||
break;
|
||||
case F_ETICHETTE:
|
||||
_tipostampa=etichette;
|
||||
@ -772,7 +772,10 @@ bool TStampaPerCategorie::user_create()
|
||||
_form_eti = new TEti_percat_form(etformato);
|
||||
_stampa80 = config.get_bool("Stampa80");
|
||||
_form_car = new TEti_percat_form("ATCARTO1");
|
||||
_form_sch = new TEti_percat_form("AT_PAGIN");
|
||||
TString16 schformato = config.get("SchFormato");
|
||||
_schxpag = config.get_int("SchXPag");
|
||||
_form_sch = new TEti_percat_form(schformato);
|
||||
_lenpage = printer().formlen();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ class TStampeSingole : public TPrintapp
|
||||
TString80 _invitoper, _data, _presso1, _presso2, _presso3, _presso4;
|
||||
TString80 _note, _intest1, _intest2, _intest3, _intest4;
|
||||
bool _usomodo, _usasez;
|
||||
int _etlarghezza, _etcolonne;
|
||||
int _etlarghezza, _etcolonne, _schxpag, _lenpage;
|
||||
|
||||
protected:
|
||||
virtual bool user_create();
|
||||
@ -77,6 +77,7 @@ protected:
|
||||
virtual bool set_print(int m);
|
||||
virtual void set_page(int file, int cnt);
|
||||
virtual bool preprocess_page(int file, int counter);
|
||||
virtual print_action postprocess_print(int file, int counter);
|
||||
ts dati_cartolina();
|
||||
|
||||
static void add_rows_soggetti(TSheet_field& s, int count = 10, int start = 1);
|
||||
@ -291,6 +292,13 @@ bool TStampeSingole::preprocess_page(int file, int counter)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
print_action TStampeSingole::postprocess_print(int file, int counter)
|
||||
{
|
||||
if ((_tipostampa == schede) && (_schxpag > 1))
|
||||
printer().formlen(_lenpage);
|
||||
return NEXT_PAGE;
|
||||
}
|
||||
|
||||
bool TStampeSingole::set_print(int m)
|
||||
{
|
||||
TSheet_field& s = (TSheet_field&)_msk->field(F_SOGGETTI);
|
||||
@ -308,6 +316,8 @@ bool TStampeSingole::set_print(int m)
|
||||
break;
|
||||
case F_SCHEDE:
|
||||
_tipostampa=schede;
|
||||
if (_schxpag > 1)
|
||||
printer().formlen(_lenpage/_schxpag);
|
||||
break;
|
||||
case F_ETICHETTE:
|
||||
_tipostampa=etichette;
|
||||
@ -366,24 +376,21 @@ bool TStampeSingole::user_create()
|
||||
|
||||
_cur = add_cursor(new TCursor(_rel, "", 1));
|
||||
_msk = new TMask("at4700a");
|
||||
//_msk->set_handler(F_PRINTER, printer_handler);
|
||||
_form_car = new TSingole_form("ATCARTO1");
|
||||
_form_sch = new TSingole_form("AT_PAGIN");
|
||||
_form_don = new TSingole_form("ATDDONAZ");
|
||||
TConfig config(CONFIG_STUDIO);
|
||||
TString16 etformato = config.get("EtFormato");
|
||||
_etlarghezza = config.get_int("EtLarghezza");
|
||||
_etcolonne = config.get_int("EtColonne");
|
||||
_form_eti = new TSingole_form(etformato);
|
||||
TString16 schformato = config.get("SchFormato");
|
||||
_schxpag = config.get_int("SchXPag");
|
||||
_form_sch = new TSingole_form(schformato);
|
||||
_lenpage = printer().formlen();
|
||||
TSheet_field& ss = (TSheet_field&)_msk->field(F_SOGGETTI);
|
||||
ss.set_notify(soggetti_notify);
|
||||
ss.sheet_mask().set_handler(F_S_NOME,nome_handler);
|
||||
ss.sheet_mask().set_handler(F_S_CODICE,codice_handler);
|
||||
/*
|
||||
TString16 config;
|
||||
config << "CARTOLINE";
|
||||
printer().read_configuration(config);
|
||||
*/
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -504,7 +511,6 @@ bool TStampeSingole::user_destroy()
|
||||
delete _form_car;
|
||||
delete _form_eti;
|
||||
delete _form_don;
|
||||
//printer().read_configuration();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ class TStampePerCodice : public TPrintapp
|
||||
TString80 _invitoper, _data, _presso1, _presso2, _presso3, _presso4;
|
||||
TString80 _note, _intest1, _intest2, _intest3, _intest4;
|
||||
bool _usomodo, _usasez;
|
||||
int _etlarghezza, _etcolonne;
|
||||
int _etlarghezza, _etcolonne, _schxpag, _lenpage;
|
||||
|
||||
protected:
|
||||
virtual bool user_create();
|
||||
@ -75,6 +75,7 @@ protected:
|
||||
virtual bool set_print(int m);
|
||||
virtual void set_page(int file, int cnt);
|
||||
virtual bool preprocess_page(int file, int counter);
|
||||
virtual print_action postprocess_print(int file, int counter);
|
||||
ts dati_cartolina();
|
||||
|
||||
public:
|
||||
@ -248,6 +249,13 @@ void TStampePerCodice::set_page(int file, int cnt)
|
||||
}
|
||||
}
|
||||
|
||||
print_action TStampePerCodice::postprocess_print(int file, int counter)
|
||||
{
|
||||
if ((_tipostampa == schede) && (_schxpag > 1))
|
||||
printer().formlen(_lenpage);
|
||||
return NEXT_PAGE;
|
||||
}
|
||||
|
||||
bool TStampePerCodice::preprocess_page(int file, int counter)
|
||||
{
|
||||
if (_tipostampa==etichette)
|
||||
@ -268,6 +276,8 @@ bool TStampePerCodice::set_print(int m)
|
||||
break;
|
||||
case F_SCHEDE:
|
||||
_tipostampa=schede;
|
||||
if (_schxpag > 1)
|
||||
printer().formlen(_lenpage/_schxpag);
|
||||
break;
|
||||
case F_ETICHETTE:
|
||||
_tipostampa=etichette;
|
||||
@ -322,20 +332,17 @@ bool TStampePerCodice::user_create()
|
||||
|
||||
_cur = add_cursor(new TCursor(_rel, "", 1));
|
||||
_msk = new TMask("at4800a");
|
||||
//_msk->set_handler(F_PRINTER, printer_handler);
|
||||
_form_car = new TPerCodice_form("ATCARTO1");
|
||||
_form_sch = new TPerCodice_form("AT_PAGIN");
|
||||
_form_don = new TPerCodice_form("ATDDONAZ");
|
||||
TConfig config(CONFIG_STUDIO);
|
||||
TString16 etformato = config.get("EtFormato");
|
||||
_etlarghezza = config.get_int("EtLarghezza");
|
||||
_etcolonne = config.get_int("EtColonne");
|
||||
_form_eti = new TPerCodice_form(etformato);
|
||||
/*
|
||||
TString16 config;
|
||||
config << "CARTOLINE";
|
||||
printer().read_configuration(config);
|
||||
*/
|
||||
TString16 schformato = config.get("SchFormato");
|
||||
_schxpag = config.get_int("SchXPag");
|
||||
_form_sch = new TPerCodice_form(schformato);
|
||||
_lenpage = printer().formlen();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -351,7 +358,6 @@ bool TStampePerCodice::user_destroy()
|
||||
delete _form_car;
|
||||
delete _form_eti;
|
||||
delete _form_don;
|
||||
//printer().read_configuration();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user