Patch level : 1.7 at
Files correlati : at2.exe Ricompilazione Demo : [ ] Commento : sistemata stampa per famiglie su file git-svn-id: svn://10.65.10.50/trunk@13095 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
1a3ffd1339
commit
0d25ad51e1
@ -37,7 +37,7 @@
|
||||
|
||||
#define ETI_COGNOME 3 // numero campo cognome e nome in etichetta (deve essere sempre cosi') per famiglie
|
||||
|
||||
enum ts { undefined=0, sintetico=1, completo=2, schede=3, etichette=4, cartoline=5, personale=6, notiziario=7, stampasufile=8 };
|
||||
enum ts { undefined=0, sintetico=1, completo=2, schede=3, etichette=4, cartoline=5, personale=6, notiziario=7, stampasufile=8, filepers=9};
|
||||
|
||||
// definizione form per etichette
|
||||
class TEti_percat_form : public TForm
|
||||
@ -65,6 +65,7 @@ class TStampaPerCategorie : public TPrintapp
|
||||
TLocalisamfile* _donaz;
|
||||
TLocalisamfile* _famiglie;
|
||||
TExternisamfile* _file;
|
||||
TExternisamfile* _filepers;
|
||||
TRecord_array* _sbenemerenze;
|
||||
TRecord_array* _sfamiglia;
|
||||
TEti_percat_form* _form_eti;
|
||||
@ -854,9 +855,14 @@ bool TStampaPerCategorie::preprocess_page(int file, int counter)
|
||||
if (_tipostampa==stampasufile)
|
||||
{
|
||||
_file->zero();
|
||||
_file->put("CODICE",recsog.get(SOG_CODICE));
|
||||
_file->put("COGNOME",recsog.get(SOG_COGNOME));
|
||||
_file->put("NOME",recsog.get(SOG_NOME));
|
||||
if (_perfamiglie)
|
||||
_file->put("NOMINATIVO", _cognome_nome);
|
||||
else
|
||||
{
|
||||
_file->put("CODICE",recsog.get(SOG_CODICE));
|
||||
_file->put("COGNOME",recsog.get(SOG_COGNOME));
|
||||
_file->put("NOME",recsog.get(SOG_NOME));
|
||||
}
|
||||
_file->put("SPOSATA",recsog.get(SOG_COGNOME_SP));
|
||||
_file->put("INDIRIZZO",recsog.get(SOG_DOM_INDIR));
|
||||
_file->put("PRESSO",recsog.get(SOG_DOM_DISTRI));
|
||||
@ -874,6 +880,32 @@ bool TStampaPerCategorie::preprocess_page(int file, int counter)
|
||||
_file->write();
|
||||
do_events();
|
||||
}
|
||||
if (_tipostampa==filepers)
|
||||
{
|
||||
_filepers->zero();
|
||||
_filepers->put("ASSOCIAZ",current_cursor()->curr(LF_SEZIONI).get("DENSEZ"));
|
||||
_filepers->put("DATANASC",recsog.get(SOG_DATANASC));
|
||||
_filepers->put("CATDON",recsog.get(SOG_CATDON));
|
||||
_filepers->put("TESSAVIS",recsog.get(SOG_TESSAVIS));
|
||||
_filepers->put("GRUPPOAB0",recsog.get(SOG_GRUPPOAB0));
|
||||
_filepers->put("KELL",recsog.get(SOG_KELL));
|
||||
_filepers->put("RHANTID",recsog.get(SOG_RHANTID));
|
||||
_filepers->put("SESSO", ((recsog.get(SOG_SESSO)[0] =='1') ? 'M' : 'F'));
|
||||
_filepers->put("COGNOME",recsog.get(SOG_COGNOME));
|
||||
_filepers->put("NOME",recsog.get(SOG_NOME));
|
||||
_filepers->put("INDIRIZZO",recsog.get(SOG_DOM_INDIR));
|
||||
_filepers->put("CAP",recsog.get(SOG_DOM_CAP));
|
||||
TString80 localita = "";
|
||||
if (recsog.get(SOG_DOM_CODLOC).not_empty())
|
||||
localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S0");
|
||||
else
|
||||
localita << current_cursor()->curr(LF_COMUNI).get(COM_DENCOM);
|
||||
localita << ' ' << current_cursor()->curr(LF_COMUNI).get(COM_PROVCOM);
|
||||
localita.trim();
|
||||
_filepers->put("LOCALITA",localita);
|
||||
_filepers->write();
|
||||
do_events();
|
||||
}
|
||||
if (_tipostampa!=etichette && _tipostampa!=notiziario)
|
||||
_contatore++;
|
||||
return TRUE;
|
||||
@ -921,12 +953,19 @@ bool TStampaPerCategorie::set_print(int m)
|
||||
_file->zap();
|
||||
}
|
||||
break;
|
||||
case F_FILEPERS:
|
||||
{
|
||||
_tipostampa=filepers;
|
||||
if (yesno_box("Azzerare il contenuto del file prima dell'elaborazione?"))
|
||||
_filepers->zap();
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (_tipostampa != undefined)
|
||||
{
|
||||
if (_tipostampa == cartoline)
|
||||
dati_cartolina();
|
||||
if (_tipostampa==etichette || _tipostampa==notiziario)
|
||||
if (_tipostampa==etichette || _tipostampa==notiziario || _tipostampa==stampasufile)
|
||||
_cognome_nome.set_width(200);
|
||||
_codsez = "**";
|
||||
_codsot = "**";
|
||||
@ -1197,6 +1236,7 @@ bool TStampaPerCategorie::user_create()
|
||||
add_cursor(new TSorted_cursor(_rel,"SOG_CODSEZ|SOG_CODSOT","",3));
|
||||
_msk = new TMask("at2700a");
|
||||
_file = new TExternisamfile("$file");
|
||||
_filepers = new TExternisamfile("$filepers");
|
||||
TConfig config(CONFIG_STUDIO);
|
||||
|
||||
TString16 etformato = config.get("EtFormato");
|
||||
@ -1230,6 +1270,7 @@ bool TStampaPerCategorie::user_destroy()
|
||||
delete _form_car;
|
||||
delete _form_eti;
|
||||
delete _msk;
|
||||
delete _filepers;
|
||||
delete _file;
|
||||
delete _sfamiglia;
|
||||
delete _sbenemerenze;
|
||||
|
Loading…
x
Reference in New Issue
Block a user