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;
|
TString16 _codsez, _codsot;
|
||||||
TString80 _eledon;
|
TString80 _eledon;
|
||||||
TString80 _eleben1,_eleben2;
|
TString80 _eleben1,_eleben2;
|
||||||
|
int _lenpage, _schxpag;
|
||||||
|
TString16 _schformato;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool user_create();
|
virtual bool user_create();
|
||||||
@ -65,6 +67,7 @@ protected:
|
|||||||
virtual bool set_print(int m);
|
virtual bool set_print(int m);
|
||||||
virtual void set_page(int file, int cnt);
|
virtual void set_page(int file, int cnt);
|
||||||
virtual bool preprocess_page (int file, int counter);
|
virtual bool preprocess_page (int file, int counter);
|
||||||
|
virtual print_action postprocess_print(int file, int counter);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void crea_intestazione();
|
void crea_intestazione();
|
||||||
@ -81,6 +84,13 @@ TCursor* TModificati_form::cursor() const { return app().current_cursor(); }
|
|||||||
|
|
||||||
TRelation* TModificati_form::relation() const { return cursor()->relation(); }
|
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()
|
void TStampaModificati::filtra_sezioni()
|
||||||
{
|
{
|
||||||
const TString16 sezini = _msk->get(F_SEZINI);
|
const TString16 sezini = _msk->get(F_SEZINI);
|
||||||
@ -245,6 +255,8 @@ bool TStampaModificati::set_print(int)
|
|||||||
break;
|
break;
|
||||||
case F_SCHEDE:
|
case F_SCHEDE:
|
||||||
_tipostampa = schede;
|
_tipostampa = schede;
|
||||||
|
if (_schxpag > 1)
|
||||||
|
printer().formlen(_lenpage/_schxpag);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (_tipostampa != undefined)
|
if (_tipostampa != undefined)
|
||||||
@ -332,8 +344,12 @@ bool TStampaModificati::user_create()
|
|||||||
_sdonazioni = new TRecord_array(LF_DONAZ,DON_PROGDON);
|
_sdonazioni = new TRecord_array(LF_DONAZ,DON_PROGDON);
|
||||||
_sbenemerenze = new TRecord_array(LF_BENEM,BEN_PROGBEN);
|
_sbenemerenze = new TRecord_array(LF_BENEM,BEN_PROGBEN);
|
||||||
add_cursor(new TCursor(_rel, "", 3));
|
add_cursor(new TCursor(_rel, "", 3));
|
||||||
_form_sch = new TModificati_form("AT_PAGIN");
|
|
||||||
_msk = new TMask("at2400a");
|
_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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ class TStampaPerCategorie : public TPrintapp
|
|||||||
TString80 _invitoper, _data, _presso1, _presso2, _presso3, _presso4;
|
TString80 _invitoper, _data, _presso1, _presso2, _presso3, _presso4;
|
||||||
TString80 _note, _intest1, _intest2, _intest3, _intest4;
|
TString80 _note, _intest1, _intest2, _intest3, _intest4;
|
||||||
bool _usomodo, _usasez;
|
bool _usomodo, _usasez;
|
||||||
int _etlarghezza, _etcolonne;
|
int _etlarghezza, _etcolonne, _schxpag, _lenpage;
|
||||||
bool _stampa80;
|
bool _stampa80;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -148,10 +148,6 @@ ts TStampaPerCategorie::dati_cartolina()
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void TStampaPerCategorie::filtra_sezioni()
|
void TStampaPerCategorie::filtra_sezioni()
|
||||||
{
|
{
|
||||||
const TString16 sezini = _msk->get(F_SEZINI);
|
const TString16 sezini = _msk->get(F_SEZINI);
|
||||||
@ -192,6 +188,8 @@ print_action TStampaPerCategorie::postprocess_print(int file, int counter)
|
|||||||
else
|
else
|
||||||
footer_sezione();
|
footer_sezione();
|
||||||
}
|
}
|
||||||
|
if ((_tipostampa == schede) && (_schxpag > 1))
|
||||||
|
printer().formlen(_lenpage);
|
||||||
return NEXT_PAGE;
|
return NEXT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -559,6 +557,8 @@ bool TStampaPerCategorie::set_print(int m)
|
|||||||
break;
|
break;
|
||||||
case F_SCHEDE:
|
case F_SCHEDE:
|
||||||
_tipostampa=schede;
|
_tipostampa=schede;
|
||||||
|
if (_schxpag > 1)
|
||||||
|
printer().formlen(_lenpage/_schxpag);
|
||||||
break;
|
break;
|
||||||
case F_ETICHETTE:
|
case F_ETICHETTE:
|
||||||
_tipostampa=etichette;
|
_tipostampa=etichette;
|
||||||
@ -772,7 +772,10 @@ bool TStampaPerCategorie::user_create()
|
|||||||
_form_eti = new TEti_percat_form(etformato);
|
_form_eti = new TEti_percat_form(etformato);
|
||||||
_stampa80 = config.get_bool("Stampa80");
|
_stampa80 = config.get_bool("Stampa80");
|
||||||
_form_car = new TEti_percat_form("ATCARTO1");
|
_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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ class TStampeSingole : public TPrintapp
|
|||||||
TString80 _invitoper, _data, _presso1, _presso2, _presso3, _presso4;
|
TString80 _invitoper, _data, _presso1, _presso2, _presso3, _presso4;
|
||||||
TString80 _note, _intest1, _intest2, _intest3, _intest4;
|
TString80 _note, _intest1, _intest2, _intest3, _intest4;
|
||||||
bool _usomodo, _usasez;
|
bool _usomodo, _usasez;
|
||||||
int _etlarghezza, _etcolonne;
|
int _etlarghezza, _etcolonne, _schxpag, _lenpage;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool user_create();
|
virtual bool user_create();
|
||||||
@ -77,6 +77,7 @@ protected:
|
|||||||
virtual bool set_print(int m);
|
virtual bool set_print(int m);
|
||||||
virtual void set_page(int file, int cnt);
|
virtual void set_page(int file, int cnt);
|
||||||
virtual bool preprocess_page(int file, int counter);
|
virtual bool preprocess_page(int file, int counter);
|
||||||
|
virtual print_action postprocess_print(int file, int counter);
|
||||||
ts dati_cartolina();
|
ts dati_cartolina();
|
||||||
|
|
||||||
static void add_rows_soggetti(TSheet_field& s, int count = 10, int start = 1);
|
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;
|
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)
|
bool TStampeSingole::set_print(int m)
|
||||||
{
|
{
|
||||||
TSheet_field& s = (TSheet_field&)_msk->field(F_SOGGETTI);
|
TSheet_field& s = (TSheet_field&)_msk->field(F_SOGGETTI);
|
||||||
@ -308,6 +316,8 @@ bool TStampeSingole::set_print(int m)
|
|||||||
break;
|
break;
|
||||||
case F_SCHEDE:
|
case F_SCHEDE:
|
||||||
_tipostampa=schede;
|
_tipostampa=schede;
|
||||||
|
if (_schxpag > 1)
|
||||||
|
printer().formlen(_lenpage/_schxpag);
|
||||||
break;
|
break;
|
||||||
case F_ETICHETTE:
|
case F_ETICHETTE:
|
||||||
_tipostampa=etichette;
|
_tipostampa=etichette;
|
||||||
@ -366,24 +376,21 @@ bool TStampeSingole::user_create()
|
|||||||
|
|
||||||
_cur = add_cursor(new TCursor(_rel, "", 1));
|
_cur = add_cursor(new TCursor(_rel, "", 1));
|
||||||
_msk = new TMask("at4700a");
|
_msk = new TMask("at4700a");
|
||||||
//_msk->set_handler(F_PRINTER, printer_handler);
|
|
||||||
_form_car = new TSingole_form("ATCARTO1");
|
_form_car = new TSingole_form("ATCARTO1");
|
||||||
_form_sch = new TSingole_form("AT_PAGIN");
|
|
||||||
_form_don = new TSingole_form("ATDDONAZ");
|
_form_don = new TSingole_form("ATDDONAZ");
|
||||||
TConfig config(CONFIG_STUDIO);
|
TConfig config(CONFIG_STUDIO);
|
||||||
TString16 etformato = config.get("EtFormato");
|
TString16 etformato = config.get("EtFormato");
|
||||||
_etlarghezza = config.get_int("EtLarghezza");
|
_etlarghezza = config.get_int("EtLarghezza");
|
||||||
_etcolonne = config.get_int("EtColonne");
|
_etcolonne = config.get_int("EtColonne");
|
||||||
_form_eti = new TSingole_form(etformato);
|
_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);
|
TSheet_field& ss = (TSheet_field&)_msk->field(F_SOGGETTI);
|
||||||
ss.set_notify(soggetti_notify);
|
ss.set_notify(soggetti_notify);
|
||||||
ss.sheet_mask().set_handler(F_S_NOME,nome_handler);
|
ss.sheet_mask().set_handler(F_S_NOME,nome_handler);
|
||||||
ss.sheet_mask().set_handler(F_S_CODICE,codice_handler);
|
ss.sheet_mask().set_handler(F_S_CODICE,codice_handler);
|
||||||
/*
|
|
||||||
TString16 config;
|
|
||||||
config << "CARTOLINE";
|
|
||||||
printer().read_configuration(config);
|
|
||||||
*/
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -504,7 +511,6 @@ bool TStampeSingole::user_destroy()
|
|||||||
delete _form_car;
|
delete _form_car;
|
||||||
delete _form_eti;
|
delete _form_eti;
|
||||||
delete _form_don;
|
delete _form_don;
|
||||||
//printer().read_configuration();
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ class TStampePerCodice : public TPrintapp
|
|||||||
TString80 _invitoper, _data, _presso1, _presso2, _presso3, _presso4;
|
TString80 _invitoper, _data, _presso1, _presso2, _presso3, _presso4;
|
||||||
TString80 _note, _intest1, _intest2, _intest3, _intest4;
|
TString80 _note, _intest1, _intest2, _intest3, _intest4;
|
||||||
bool _usomodo, _usasez;
|
bool _usomodo, _usasez;
|
||||||
int _etlarghezza, _etcolonne;
|
int _etlarghezza, _etcolonne, _schxpag, _lenpage;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool user_create();
|
virtual bool user_create();
|
||||||
@ -75,6 +75,7 @@ protected:
|
|||||||
virtual bool set_print(int m);
|
virtual bool set_print(int m);
|
||||||
virtual void set_page(int file, int cnt);
|
virtual void set_page(int file, int cnt);
|
||||||
virtual bool preprocess_page(int file, int counter);
|
virtual bool preprocess_page(int file, int counter);
|
||||||
|
virtual print_action postprocess_print(int file, int counter);
|
||||||
ts dati_cartolina();
|
ts dati_cartolina();
|
||||||
|
|
||||||
public:
|
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)
|
bool TStampePerCodice::preprocess_page(int file, int counter)
|
||||||
{
|
{
|
||||||
if (_tipostampa==etichette)
|
if (_tipostampa==etichette)
|
||||||
@ -268,6 +276,8 @@ bool TStampePerCodice::set_print(int m)
|
|||||||
break;
|
break;
|
||||||
case F_SCHEDE:
|
case F_SCHEDE:
|
||||||
_tipostampa=schede;
|
_tipostampa=schede;
|
||||||
|
if (_schxpag > 1)
|
||||||
|
printer().formlen(_lenpage/_schxpag);
|
||||||
break;
|
break;
|
||||||
case F_ETICHETTE:
|
case F_ETICHETTE:
|
||||||
_tipostampa=etichette;
|
_tipostampa=etichette;
|
||||||
@ -322,20 +332,17 @@ bool TStampePerCodice::user_create()
|
|||||||
|
|
||||||
_cur = add_cursor(new TCursor(_rel, "", 1));
|
_cur = add_cursor(new TCursor(_rel, "", 1));
|
||||||
_msk = new TMask("at4800a");
|
_msk = new TMask("at4800a");
|
||||||
//_msk->set_handler(F_PRINTER, printer_handler);
|
|
||||||
_form_car = new TPerCodice_form("ATCARTO1");
|
_form_car = new TPerCodice_form("ATCARTO1");
|
||||||
_form_sch = new TPerCodice_form("AT_PAGIN");
|
|
||||||
_form_don = new TPerCodice_form("ATDDONAZ");
|
_form_don = new TPerCodice_form("ATDDONAZ");
|
||||||
TConfig config(CONFIG_STUDIO);
|
TConfig config(CONFIG_STUDIO);
|
||||||
TString16 etformato = config.get("EtFormato");
|
TString16 etformato = config.get("EtFormato");
|
||||||
_etlarghezza = config.get_int("EtLarghezza");
|
_etlarghezza = config.get_int("EtLarghezza");
|
||||||
_etcolonne = config.get_int("EtColonne");
|
_etcolonne = config.get_int("EtColonne");
|
||||||
_form_eti = new TPerCodice_form(etformato);
|
_form_eti = new TPerCodice_form(etformato);
|
||||||
/*
|
TString16 schformato = config.get("SchFormato");
|
||||||
TString16 config;
|
_schxpag = config.get_int("SchXPag");
|
||||||
config << "CARTOLINE";
|
_form_sch = new TPerCodice_form(schformato);
|
||||||
printer().read_configuration(config);
|
_lenpage = printer().formlen();
|
||||||
*/
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -351,7 +358,6 @@ bool TStampePerCodice::user_destroy()
|
|||||||
delete _form_car;
|
delete _form_car;
|
||||||
delete _form_eti;
|
delete _form_eti;
|
||||||
delete _form_don;
|
delete _form_don;
|
||||||
//printer().read_configuration();
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user