1997-12-05 16:26:15 +00:00
|
|
|
|
#include <form.h>
|
1997-03-20 10:33:28 +00:00
|
|
|
|
#include <mask.h>
|
|
|
|
|
#include <printapp.h>
|
1998-10-16 14:17:12 +00:00
|
|
|
|
#include <tabutil.h>
|
1997-03-20 10:33:28 +00:00
|
|
|
|
#include <utility.h>
|
|
|
|
|
|
1997-12-05 16:26:15 +00:00
|
|
|
|
#include "benem.h"
|
1997-03-20 10:33:28 +00:00
|
|
|
|
#include "soggetti.h"
|
|
|
|
|
#include "sezioni.h"
|
|
|
|
|
#include <comuni.h>
|
|
|
|
|
|
|
|
|
|
#include "at1.h"
|
|
|
|
|
#include "at1400a.h"
|
1999-02-12 14:05:35 +00:00
|
|
|
|
#include "atlib.h"
|
1997-03-20 10:33:28 +00:00
|
|
|
|
|
2002-01-16 13:48:52 +00:00
|
|
|
|
#define ALIAS_BNZ 600
|
|
|
|
|
#define ALIAS_GAZ 300
|
1997-03-20 10:33:28 +00:00
|
|
|
|
|
2002-01-16 13:48:52 +00:00
|
|
|
|
#define ALIAS_LCPDOM 100 // localita' postale di domicilio
|
|
|
|
|
#define ALIAS_COMDOM 501 // comune di domicilio
|
1997-12-05 16:26:15 +00:00
|
|
|
|
|
2002-01-16 13:48:52 +00:00
|
|
|
|
#define ETI_COGNOME 3 // numero campo cognome e nome in etichetta (deve essere sempre cosi') per famiglie
|
2004-02-26 10:48:05 +00:00
|
|
|
|
#define LET_BENEM 10 // campo benemerenza in form per lettera
|
1999-01-26 13:57:17 +00:00
|
|
|
|
|
2004-02-26 10:48:05 +00:00
|
|
|
|
enum ts { undefined=0, sintetico=1, completo=2, etichette=3, lettere=4 };
|
1999-01-26 13:57:17 +00:00
|
|
|
|
|
|
|
|
|
// definizione form per etichette
|
|
|
|
|
class TEti_bengru_form : public TForm
|
|
|
|
|
{
|
|
|
|
|
public:
|
2002-01-16 13:48:52 +00:00
|
|
|
|
|
|
|
|
|
virtual TCursor* cursor() const;
|
|
|
|
|
virtual TRelation* relation() const;
|
|
|
|
|
TPrint_section& get_body() { return section('B'); } ;
|
|
|
|
|
TPrint_section& get_head() { return section('H'); } ;
|
|
|
|
|
TPrint_section& get_foot() { return section('F'); } ;
|
1999-01-26 13:57:17 +00:00
|
|
|
|
TEti_bengru_form(): TForm() {};
|
|
|
|
|
TEti_bengru_form(const char* form, const char * code = "", int editlevel = 0, const char* desc = "")
|
2002-01-16 13:48:52 +00:00
|
|
|
|
: TForm(form,code,editlevel,desc) {};
|
1999-01-26 13:57:17 +00:00
|
|
|
|
virtual ~TEti_bengru_form() {};
|
|
|
|
|
};
|
|
|
|
|
|
1997-12-05 16:26:15 +00:00
|
|
|
|
class TStampaBenxGAz : public TPrintapp
|
|
|
|
|
{
|
2002-01-16 13:48:52 +00:00
|
|
|
|
TRelation* _rel;
|
|
|
|
|
TMask* _msk;
|
|
|
|
|
TEti_bengru_form* _form_eti;
|
2004-02-26 10:48:05 +00:00
|
|
|
|
TEti_bengru_form* _form_let;
|
2002-01-16 13:48:52 +00:00
|
|
|
|
int _cur;
|
|
|
|
|
char _tiposta;
|
|
|
|
|
TDate _dataini, _datafin;
|
|
|
|
|
TString16 _codsez, _codsot;
|
|
|
|
|
TParagraph_string _cognome_nome, _dencom;
|
|
|
|
|
TString16 _gruppoazie, _gruppoold, _tipoold;
|
|
|
|
|
int _contatore;
|
|
|
|
|
ts _tipostampa;
|
|
|
|
|
int _etlarghezza, _etcolonne;
|
|
|
|
|
bool _stampa80, _etictot;
|
1997-03-20 10:33:28 +00:00
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
virtual bool user_create();
|
|
|
|
|
virtual bool user_destroy();
|
|
|
|
|
virtual bool set_print(int m);
|
|
|
|
|
virtual void set_page(int file, int cnt);
|
|
|
|
|
virtual bool preprocess_page(int file, int counter);
|
1997-12-05 16:26:15 +00:00
|
|
|
|
virtual print_action postprocess_print(int file, int counter);
|
1997-03-20 10:33:28 +00:00
|
|
|
|
|
|
|
|
|
public:
|
1997-12-05 16:26:15 +00:00
|
|
|
|
void crea_intestazione();
|
|
|
|
|
void header_gruppo(const TString16 gruppo);
|
|
|
|
|
void footer_gruppo();
|
1997-03-20 10:33:28 +00:00
|
|
|
|
TMask& app_mask() { return *_msk; }
|
1997-12-05 16:26:15 +00:00
|
|
|
|
TStampaBenxGAz() : _cognome_nome("",35), _dencom("",50) {}
|
1997-03-20 10:33:28 +00:00
|
|
|
|
};
|
|
|
|
|
|
1997-12-05 16:26:15 +00:00
|
|
|
|
HIDDEN inline TStampaBenxGAz& app() { return (TStampaBenxGAz&) main_app(); }
|
1997-03-20 10:33:28 +00:00
|
|
|
|
|
1999-01-26 13:57:17 +00:00
|
|
|
|
TCursor* TEti_bengru_form::cursor() const { return app().current_cursor(); }
|
|
|
|
|
|
|
|
|
|
TRelation* TEti_bengru_form::relation() const { return cursor()->relation(); }
|
|
|
|
|
|
1997-12-05 16:26:15 +00:00
|
|
|
|
print_action TStampaBenxGAz::postprocess_print(int file, int counter)
|
|
|
|
|
{
|
2002-01-16 13:48:52 +00:00
|
|
|
|
if (_contatore > 0)
|
|
|
|
|
footer_gruppo();
|
|
|
|
|
return NEXT_PAGE;
|
1997-03-20 10:33:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
1997-12-05 16:26:15 +00:00
|
|
|
|
void TStampaBenxGAz::footer_gruppo()
|
1997-03-20 10:33:28 +00:00
|
|
|
|
{
|
2002-01-16 13:48:52 +00:00
|
|
|
|
// stampa totale benemerenze attribuite al gruppo
|
|
|
|
|
reset_footer();
|
|
|
|
|
TString sep(80);
|
|
|
|
|
sep.fill('-');
|
|
|
|
|
set_footer(2, (const char *) sep);
|
|
|
|
|
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _contatore);
|
|
|
|
|
printer().formfeed();
|
|
|
|
|
reset_footer();
|
1997-03-20 10:33:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
1997-12-05 16:26:15 +00:00
|
|
|
|
void TStampaBenxGAz::set_page(int file, int cnt)
|
1997-03-20 10:33:28 +00:00
|
|
|
|
{
|
2002-01-16 13:48:52 +00:00
|
|
|
|
switch (_tipostampa)
|
|
|
|
|
{
|
|
|
|
|
case etichette:
|
|
|
|
|
{
|
|
|
|
|
TPrint_section& corpo = _form_eti->get_body();
|
|
|
|
|
for (int r=1;r<=_etcolonne;r++)
|
|
|
|
|
{
|
|
|
|
|
if (current_cursor()->pos()<current_cursor()->items())
|
|
|
|
|
{
|
|
|
|
|
bool avanza = TRUE;
|
|
|
|
|
while (avanza)
|
|
|
|
|
{
|
|
|
|
|
if (current_cursor()->pos()<current_cursor()->items())
|
|
|
|
|
avanza = !(preprocess_page(file, cnt));
|
|
|
|
|
else
|
|
|
|
|
avanza = FALSE;
|
|
|
|
|
if (avanza)
|
|
|
|
|
++(*current_cursor());
|
|
|
|
|
}
|
|
|
|
|
force_setpage(TRUE);
|
|
|
|
|
TForm_item& cognome = corpo.find_field(ETI_COGNOME);
|
|
|
|
|
cognome.set(_cognome_nome);
|
|
|
|
|
corpo.update();
|
|
|
|
|
for (word i = 0; i < corpo.height(); i++)
|
|
|
|
|
{
|
|
|
|
|
TPrintrow& riga = corpo.row(i);
|
|
|
|
|
TString256 riga1 = riga.row();
|
|
|
|
|
riga1.cut(_etlarghezza);
|
|
|
|
|
int colonna = ((r-1)*_etlarghezza);
|
|
|
|
|
TString16 formato;
|
|
|
|
|
formato << '@' << colonna << 'g';
|
|
|
|
|
riga1.insert(formato,0);
|
|
|
|
|
set_row(i+1,riga1);
|
|
|
|
|
}
|
|
|
|
|
if (r < _etcolonne)
|
|
|
|
|
{
|
|
|
|
|
bool avanza = TRUE;
|
|
|
|
|
while (avanza)
|
|
|
|
|
{
|
|
|
|
|
++(*current_cursor());
|
|
|
|
|
if (current_cursor()->pos()<current_cursor()->items())
|
|
|
|
|
avanza = !(preprocess_page(file, cnt));
|
|
|
|
|
else
|
|
|
|
|
avanza = FALSE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
2004-02-26 10:48:05 +00:00
|
|
|
|
case lettere:
|
|
|
|
|
{
|
|
|
|
|
TPrint_section& corpo = _form_let->get_body();
|
|
|
|
|
TForm_item& item_benem = corpo.find_field(LET_BENEM);
|
|
|
|
|
TString80 benem = current_cursor()->curr(-ALIAS_BNZ).get("S0");
|
|
|
|
|
int new_x = (88-benem.len())/2;
|
|
|
|
|
item_benem.set_x(new_x);
|
|
|
|
|
corpo.update();
|
|
|
|
|
for (word i = 0; i < corpo.height(); i++)
|
|
|
|
|
{
|
|
|
|
|
TPrintrow& riga = corpo.row(i);
|
|
|
|
|
set_row(i+1,riga);
|
|
|
|
|
}
|
|
|
|
|
force_setpage(TRUE); // serve perch<63> alla prossima etichetta rifaccia la setpage
|
|
|
|
|
// altrimenti stampa sempre la stessa etichetta
|
|
|
|
|
}
|
|
|
|
|
break;
|
1999-01-26 13:57:17 +00:00
|
|
|
|
case completo:
|
|
|
|
|
{
|
2002-01-16 13:48:52 +00:00
|
|
|
|
set_row(1,"@0g@pn", FLD(LF_SOGGETTI,SOG_CODICE,"########"));
|
|
|
|
|
set_row(1,"@9g@S", FLD(LF_SOGGETTI,SOG_CATDON));
|
|
|
|
|
set_row(1,"@12g#a", &_cognome_nome);
|
|
|
|
|
set_row(1,"@38g@ld", FLD(LF_SOGGETTI,SOG_DATANASC));
|
|
|
|
|
set_row(1,"@49g@S", FLD(LF_SOGGETTI,SOG_DOM_INDIR));
|
|
|
|
|
set_row(1,"@100g@S", FLD(LF_SOGGETTI,SOG_TELABI));
|
|
|
|
|
set_row(1,"@116g@S", FLD(LF_SOGGETTI,SOG_TELLAV));
|
|
|
|
|
set_row(2,"@0g@S", FLD(LF_SOGGETTI,SOG_TESSAVIS));
|
|
|
|
|
set_row(2,"@49g#a", &_dencom);
|
|
|
|
|
set_row(2,"@116g@S", FLD(LF_SOGGETTI,SOG_TELALT));
|
|
|
|
|
set_row(3,"@100g@pn", FLD(LF_SOGGETTI,SOG_TOTDON,"###"));
|
|
|
|
|
set_row(4,"");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
break;
|
1999-01-26 13:57:17 +00:00
|
|
|
|
case sintetico:
|
|
|
|
|
{
|
2002-01-16 13:48:52 +00:00
|
|
|
|
set_row(1,"@0g#a", &_cognome_nome);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
1997-03-20 10:33:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
1997-12-05 16:26:15 +00:00
|
|
|
|
bool TStampaBenxGAz::preprocess_page(int file, int counter)
|
1999-01-26 13:57:17 +00:00
|
|
|
|
{
|
2002-01-16 13:48:52 +00:00
|
|
|
|
if (_tipostampa==sintetico||_tipostampa==completo)
|
1999-01-26 13:57:17 +00:00
|
|
|
|
{
|
2002-01-16 13:48:52 +00:00
|
|
|
|
TString80 nome = current_cursor()->curr(LF_SOGGETTI).get(SOG_COGNOME);
|
|
|
|
|
nome << " ";
|
|
|
|
|
nome << current_cursor()->curr(LF_SOGGETTI).get(SOG_NOME);
|
|
|
|
|
_cognome_nome = nome;
|
|
|
|
|
TString256 localita = "";
|
|
|
|
|
localita = current_cursor()->curr(LF_SOGGETTI).get(SOG_DOM_CAP);
|
|
|
|
|
localita << " ";
|
|
|
|
|
if (current_cursor()->curr(LF_SOGGETTI).get(SOG_DOM_CODLOC).not_empty())
|
|
|
|
|
{
|
|
|
|
|
localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S0");
|
|
|
|
|
localita << " - ";
|
|
|
|
|
}
|
|
|
|
|
localita << current_cursor()->curr(-ALIAS_COMDOM).get(COM_DENCOM);
|
|
|
|
|
localita.trim();
|
|
|
|
|
_dencom = localita;
|
|
|
|
|
// salto pagina se cambio punto di rottura
|
|
|
|
|
TString16 grupponew;
|
|
|
|
|
if (app()._tiposta == 'S')
|
|
|
|
|
grupponew = current_cursor()->curr(LF_SOGGETTI).get(SOG_GRUPPOAZIE);
|
|
|
|
|
else
|
|
|
|
|
grupponew = current_cursor()->curr().get(BEN_GRUPPOAZIE);
|
|
|
|
|
if (grupponew != _gruppoold )
|
|
|
|
|
{
|
|
|
|
|
if (_gruppoold != "**")
|
|
|
|
|
footer_gruppo();
|
|
|
|
|
_contatore = 0;
|
|
|
|
|
_gruppoold = grupponew;
|
|
|
|
|
header_gruppo(grupponew);
|
|
|
|
|
_tipoold = "**";
|
|
|
|
|
}
|
|
|
|
|
TString16 tiponew = current_cursor()->curr().get(BEN_TIPOBEN);
|
|
|
|
|
if (tiponew != _tipoold)
|
|
|
|
|
{
|
|
|
|
|
TPrintrow riga;
|
|
|
|
|
printer().print(riga);
|
|
|
|
|
riga.reset();
|
|
|
|
|
riga.put(current_cursor()->curr(-ALIAS_BNZ).get("S0"));
|
|
|
|
|
_tipoold = tiponew;
|
|
|
|
|
if (printer().rows_left() < 3)
|
|
|
|
|
printer().formfeed();
|
|
|
|
|
printer().print(riga);
|
|
|
|
|
riga.reset();
|
|
|
|
|
printer().print(riga);
|
|
|
|
|
}
|
|
|
|
|
if (printer().rows_left() < 4)
|
|
|
|
|
printer().formfeed();
|
|
|
|
|
}
|
|
|
|
|
if (_tipostampa==etichette)
|
|
|
|
|
if (printer().rows_left() < _form_eti->get_body().height())
|
|
|
|
|
printer().formfeed();
|
2004-02-26 10:48:05 +00:00
|
|
|
|
if (_tipostampa==lettere)
|
|
|
|
|
if (printer().rows_left() < _form_let->get_body().height())
|
|
|
|
|
printer().formfeed();
|
2002-01-16 13:48:52 +00:00
|
|
|
|
_contatore++;
|
1997-12-05 16:26:15 +00:00
|
|
|
|
return TRUE;
|
1997-03-20 10:33:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
1997-12-05 16:26:15 +00:00
|
|
|
|
void TStampaBenxGAz::header_gruppo(const TString16 gruppo)
|
1998-10-16 14:17:12 +00:00
|
|
|
|
{
|
2002-01-16 13:48:52 +00:00
|
|
|
|
TString intestazione(132);
|
|
|
|
|
intestazione = "GRUPPO AZIENDALE ";
|
|
|
|
|
intestazione << gruppo;
|
|
|
|
|
intestazione << " - ";
|
2002-10-24 09:06:17 +00:00
|
|
|
|
intestazione << cache().get("GAZ", gruppo).get("S0");
|
2002-01-16 13:48:52 +00:00
|
|
|
|
if (_tipostampa==completo)
|
|
|
|
|
intestazione.center_just(132);
|
|
|
|
|
if (_tipostampa==sintetico)
|
|
|
|
|
intestazione.left_just(132);
|
|
|
|
|
set_header(2,"@0g%s", (const char*) intestazione);
|
|
|
|
|
return;
|
1997-03-20 10:33:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
1997-12-05 16:26:15 +00:00
|
|
|
|
bool TStampaBenxGAz::set_print(int m)
|
1997-03-20 10:33:28 +00:00
|
|
|
|
{
|
1999-02-12 14:05:35 +00:00
|
|
|
|
TPrinter& p = printer();
|
2002-01-16 13:48:52 +00:00
|
|
|
|
p.read_configuration();
|
|
|
|
|
_tipostampa = undefined;
|
1997-03-20 10:33:28 +00:00
|
|
|
|
KEY tasto;
|
1999-01-26 13:57:17 +00:00
|
|
|
|
tasto = _msk->run();
|
|
|
|
|
switch (tasto)
|
|
|
|
|
{
|
2002-01-16 13:48:52 +00:00
|
|
|
|
case F_SINTETICO:
|
|
|
|
|
_tipostampa=sintetico;
|
|
|
|
|
break;
|
|
|
|
|
case F_COMPLETO:
|
|
|
|
|
_tipostampa=completo;
|
|
|
|
|
break;
|
|
|
|
|
case F_ETICHETTE:
|
|
|
|
|
_tipostampa = (configura_stampante(p, "AT_ETICHETTE", "etichette")) ? etichette : undefined;
|
2004-02-26 10:48:05 +00:00
|
|
|
|
break;
|
|
|
|
|
case F_LETTERE:
|
|
|
|
|
_tipostampa = lettere;
|
|
|
|
|
break;
|
2002-01-16 13:48:52 +00:00
|
|
|
|
}
|
|
|
|
|
if (_tipostampa != undefined)
|
1999-01-26 13:57:17 +00:00
|
|
|
|
{
|
2002-01-16 13:48:52 +00:00
|
|
|
|
if (_tipostampa == etichette)
|
|
|
|
|
_cognome_nome.set_width(200);
|
|
|
|
|
if (_tipostampa == sintetico)
|
|
|
|
|
_cognome_nome.set_width(51);
|
|
|
|
|
_dataini = _msk->get_date(F_DATAINI);
|
|
|
|
|
_datafin = _msk->get_date(F_DATAFIN);
|
|
|
|
|
_gruppoazie = _msk->get(F_GRUPPOAZIE);
|
|
|
|
|
_tiposta = _msk->get(F_TIPOSTA)[0];
|
|
|
|
|
TRectype da(LF_BENEM);
|
|
|
|
|
TRectype a (LF_BENEM);
|
|
|
|
|
if (_dataini.ok())
|
|
|
|
|
da.put(BEN_DATABEN, _dataini);
|
|
|
|
|
if (_datafin.ok())
|
|
|
|
|
a.put(BEN_DATABEN, _datafin);
|
|
|
|
|
TString80 chiave = "";
|
|
|
|
|
if (_tiposta == 'S')
|
|
|
|
|
chiave = "90->GRUPPOAZIE|94->TIPOBEN|UPPER(90->COGNOME)|UPPER(90->NOME)";
|
|
|
|
|
else
|
|
|
|
|
chiave = "94->GRUPPOAZIE|94->TIPOBEN|UPPER(90->COGNOME)|UPPER(90->NOME)";
|
|
|
|
|
_cur = add_cursor(new TSorted_cursor(_rel, (const char*) chiave, "", 2, &da, &a));
|
|
|
|
|
TString80 filtro = "";
|
|
|
|
|
if (_gruppoazie.not_empty())
|
|
|
|
|
{
|
|
|
|
|
if (_tiposta == 'S')
|
|
|
|
|
filtro = format("(90->GRUPPOAZIE == \"%s\")",(const char*)_gruppoazie);
|
|
|
|
|
else
|
|
|
|
|
filtro = format("(94->GRUPPOAZIE == \"%s\")",(const char*)_gruppoazie);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
if (_tiposta == 'S')
|
|
|
|
|
filtro = format("(90->GRUPPOAZIE != \"\")");
|
|
|
|
|
else
|
|
|
|
|
filtro = format("(94->GRUPPOAZIE != \"\")");
|
|
|
|
|
current_cursor()->setfilter((const char*) filtro, TRUE);
|
|
|
|
|
_contatore = 0;
|
|
|
|
|
_gruppoold = "**";
|
|
|
|
|
_tipoold = "**";
|
|
|
|
|
reset_files();
|
|
|
|
|
add_file(LF_BENEM);
|
|
|
|
|
reset_print();
|
|
|
|
|
printer().footerlen(0);
|
|
|
|
|
crea_intestazione();
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
return FALSE;
|
1997-03-20 10:33:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
1997-12-05 16:26:15 +00:00
|
|
|
|
void TStampaBenxGAz::crea_intestazione()
|
1997-03-20 10:33:28 +00:00
|
|
|
|
{
|
1999-01-26 13:57:17 +00:00
|
|
|
|
reset_header();
|
2002-01-16 13:48:52 +00:00
|
|
|
|
if (_tipostampa==sintetico || _tipostampa==completo)
|
1999-01-26 13:57:17 +00:00
|
|
|
|
{
|
2002-01-16 13:48:52 +00:00
|
|
|
|
TString sep(132);
|
|
|
|
|
sep = "STAMPA BENEMERENZE ATTRIBUITE dal ";
|
|
|
|
|
sep << _dataini;
|
|
|
|
|
sep << " al ";
|
|
|
|
|
sep << _datafin;
|
|
|
|
|
if (_tipostampa==completo)
|
|
|
|
|
sep.center_just(132);
|
|
|
|
|
if (_tipostampa==sintetico)
|
|
|
|
|
sep.left_just(132);
|
|
|
|
|
set_header(1,"@0g%s", (const char*) sep);
|
|
|
|
|
sep = "Pag. @#";
|
|
|
|
|
if (_tipostampa==completo)
|
|
|
|
|
set_header(2, "@110g%s", (const char*) sep);
|
|
|
|
|
if (_tipostampa==sintetico)
|
|
|
|
|
set_header(2, "@60g%s", (const char*) sep);
|
|
|
|
|
sep = "";
|
|
|
|
|
sep.fill('-');
|
|
|
|
|
if (_tipostampa==completo)
|
|
|
|
|
{
|
|
|
|
|
set_header(3,"@0gCodice@9gC.@12gCognome e nome@38gNato il@49gIndirizzo@100gTelefono abit.@116gTelefono lavoro");
|
|
|
|
|
set_header(4,"@0gTessera@49gCAP/Localit<69>/Comune/Prov.@116gTelefono altro");
|
|
|
|
|
set_header(5,"@100gTot.don.");
|
|
|
|
|
set_header(6,"@0g--------@9g--@12g-------------------------@38g----------@49g--------------------------------------------------@100g---------------@116g---------------");
|
|
|
|
|
}
|
|
|
|
|
printer().footerlen(3);
|
|
|
|
|
}
|
1997-12-05 16:26:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool TStampaBenxGAz::user_create()
|
|
|
|
|
{
|
|
|
|
|
_rel = new TRelation(LF_BENEM);
|
|
|
|
|
_rel->add(LF_SOGGETTI, "CODICE==CODICE");
|
|
|
|
|
_rel->add("BNZ", "CODTAB==TIPOBEN",1,0,ALIAS_BNZ);
|
1998-10-16 14:17:12 +00:00
|
|
|
|
//_rel->add("GAZ", "CODTAB==GRUPPOAZIE",1,LF_SOGGETTI,ALIAS_GAZ);
|
2004-02-26 10:48:05 +00:00
|
|
|
|
//_rel->add("LCP", "CODTAB==RES_CODLOC",1,LF_SOGGETTI,ALIAS_LCPRES);
|
1997-12-05 16:26:15 +00:00
|
|
|
|
_rel->add("LCP", "CODTAB==DOM_CODLOC",1,LF_SOGGETTI,ALIAS_LCPDOM);
|
2004-02-26 10:48:05 +00:00
|
|
|
|
//_rel->add(LF_COMUNI, "COM==RES_CODCOM",1,LF_SOGGETTI,ALIAS_COMRES);
|
1997-12-05 16:26:15 +00:00
|
|
|
|
_rel->add(LF_COMUNI, "COM==DOM_CODCOM",1,LF_SOGGETTI,ALIAS_COMDOM);
|
2004-02-26 10:48:05 +00:00
|
|
|
|
//_rel->add(LF_COMUNI, "COM==COMNASC",1,LF_SOGGETTI,ALIAS_COMNAS);
|
1997-03-20 10:33:28 +00:00
|
|
|
|
_msk = new TMask("at1400a");
|
1997-12-05 16:26:15 +00:00
|
|
|
|
TConfig config(CONFIG_STUDIO);
|
1999-01-26 13:57:17 +00:00
|
|
|
|
TString16 etformato = config.get("EtFormato");
|
|
|
|
|
_etlarghezza = config.get_int("EtLarghezza");
|
|
|
|
|
_etcolonne = config.get_int("EtColonne");
|
2002-01-16 13:48:52 +00:00
|
|
|
|
_form_eti = new TEti_bengru_form(etformato);
|
2004-02-26 10:48:05 +00:00
|
|
|
|
_form_let = new TEti_bengru_form("ATLEBEBO");
|
1997-12-05 16:26:15 +00:00
|
|
|
|
_stampa80 = config.get_bool("Stampa80");
|
1999-01-26 13:57:17 +00:00
|
|
|
|
_etictot = config.get_bool("EticTot");
|
1997-03-20 10:33:28 +00:00
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
1997-12-05 16:26:15 +00:00
|
|
|
|
bool TStampaBenxGAz::user_destroy()
|
1999-01-26 13:57:17 +00:00
|
|
|
|
{
|
2004-02-26 10:48:05 +00:00
|
|
|
|
delete _form_let;
|
2002-01-16 13:48:52 +00:00
|
|
|
|
delete _form_eti;
|
1997-03-20 10:33:28 +00:00
|
|
|
|
delete _msk;
|
|
|
|
|
delete _rel;
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int at1400(int argc, char* argv[])
|
|
|
|
|
{
|
1997-12-05 16:26:15 +00:00
|
|
|
|
TStampaBenxGAz a;
|
1998-08-07 09:48:37 +00:00
|
|
|
|
a.run(argc, argv, "Elenco benemerenze per gr.aziend.");
|
1997-03-20 10:33:28 +00:00
|
|
|
|
return 0;
|
|
|
|
|
}
|