Patch level :1.7 avis
Files correlati :at1.exe atet10bo.frm Ricompilazione Demo : [ ] Commento :aggiunta stampa comune nelle etichette per benemerenze aziendali (una cosa da avis!) git-svn-id: svn://10.65.10.50/trunk@10007 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
6fada6830c
commit
d44619b4a3
526
at/at1400.cpp
526
at/at1400.cpp
@ -13,16 +13,16 @@
|
|||||||
#include "at1400a.h"
|
#include "at1400a.h"
|
||||||
#include "atlib.h"
|
#include "atlib.h"
|
||||||
|
|
||||||
#define ALIAS_BNZ 600
|
#define ALIAS_BNZ 600
|
||||||
#define ALIAS_GAZ 300
|
#define ALIAS_GAZ 300
|
||||||
|
|
||||||
#define ALIAS_LCPRES 101 // localita' postale di residenza
|
#define ALIAS_LCPRES 101 // localita' postale di residenza
|
||||||
#define ALIAS_LCPDOM 100 // localita' postale di domicilio
|
#define ALIAS_LCPDOM 100 // localita' postale di domicilio
|
||||||
#define ALIAS_COMRES 502 // comune di residenza
|
#define ALIAS_COMRES 502 // comune di residenza
|
||||||
#define ALIAS_COMDOM 501 // comune di domicilio
|
#define ALIAS_COMDOM 501 // comune di domicilio
|
||||||
#define ALIAS_COMNAS 500 // comune di nascita
|
#define ALIAS_COMNAS 500 // comune di nascita
|
||||||
|
|
||||||
#define ETI_COGNOME 3 // numero campo cognome e nome in etichetta (deve essere sempre cosi') per famiglie
|
#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, etichette=3 };
|
enum ts { undefined=0, sintetico=1, completo=2, etichette=3 };
|
||||||
|
|
||||||
@ -30,33 +30,33 @@ enum ts { undefined=0, sintetico=1, completo=2, etichette=3 };
|
|||||||
class TEti_bengru_form : public TForm
|
class TEti_bengru_form : public TForm
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual TCursor* cursor() const;
|
virtual TCursor* cursor() const;
|
||||||
virtual TRelation* relation() const;
|
virtual TRelation* relation() const;
|
||||||
TPrint_section& get_body() { return section('B'); } ;
|
TPrint_section& get_body() { return section('B'); } ;
|
||||||
TPrint_section& get_head() { return section('H'); } ;
|
TPrint_section& get_head() { return section('H'); } ;
|
||||||
TPrint_section& get_foot() { return section('F'); } ;
|
TPrint_section& get_foot() { return section('F'); } ;
|
||||||
TEti_bengru_form(): TForm() {};
|
TEti_bengru_form(): TForm() {};
|
||||||
TEti_bengru_form(const char* form, const char * code = "", int editlevel = 0, const char* desc = "")
|
TEti_bengru_form(const char* form, const char * code = "", int editlevel = 0, const char* desc = "")
|
||||||
: TForm(form,code,editlevel,desc) {};
|
: TForm(form,code,editlevel,desc) {};
|
||||||
virtual ~TEti_bengru_form() {};
|
virtual ~TEti_bengru_form() {};
|
||||||
};
|
};
|
||||||
|
|
||||||
class TStampaBenxGAz : public TPrintapp
|
class TStampaBenxGAz : public TPrintapp
|
||||||
{
|
{
|
||||||
TRelation* _rel;
|
TRelation* _rel;
|
||||||
TMask* _msk;
|
TMask* _msk;
|
||||||
TEti_bengru_form* _form_eti;
|
TEti_bengru_form* _form_eti;
|
||||||
int _cur;
|
int _cur;
|
||||||
char _tiposta;
|
char _tiposta;
|
||||||
TDate _dataini, _datafin;
|
TDate _dataini, _datafin;
|
||||||
TString16 _codsez, _codsot;
|
TString16 _codsez, _codsot;
|
||||||
TParagraph_string _cognome_nome, _dencom;
|
TParagraph_string _cognome_nome, _dencom;
|
||||||
TString16 _gruppoazie, _gruppoold, _tipoold;
|
TString16 _gruppoazie, _gruppoold, _tipoold;
|
||||||
int _contatore;
|
int _contatore;
|
||||||
ts _tipostampa;
|
ts _tipostampa;
|
||||||
int _etlarghezza, _etcolonne;
|
int _etlarghezza, _etcolonne;
|
||||||
bool _stampa80, _etictot;
|
bool _stampa80, _etictot;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool user_create();
|
virtual bool user_create();
|
||||||
@ -82,277 +82,277 @@ TRelation* TEti_bengru_form::relation() const { return cursor()->relation(); }
|
|||||||
|
|
||||||
print_action TStampaBenxGAz::postprocess_print(int file, int counter)
|
print_action TStampaBenxGAz::postprocess_print(int file, int counter)
|
||||||
{
|
{
|
||||||
if (_contatore > 0)
|
if (_contatore > 0)
|
||||||
footer_gruppo();
|
footer_gruppo();
|
||||||
return NEXT_PAGE;
|
return NEXT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TStampaBenxGAz::footer_gruppo()
|
void TStampaBenxGAz::footer_gruppo()
|
||||||
{
|
{
|
||||||
// stampa totale benemerenze attribuite al gruppo
|
// stampa totale benemerenze attribuite al gruppo
|
||||||
reset_footer();
|
reset_footer();
|
||||||
TString sep(80);
|
TString sep(80);
|
||||||
sep.fill('-');
|
sep.fill('-');
|
||||||
set_footer(2, (const char *) sep);
|
set_footer(2, (const char *) sep);
|
||||||
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _contatore);
|
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _contatore);
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
reset_footer();
|
reset_footer();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TStampaBenxGAz::set_page(int file, int cnt)
|
void TStampaBenxGAz::set_page(int file, int cnt)
|
||||||
{
|
{
|
||||||
switch (_tipostampa)
|
switch (_tipostampa)
|
||||||
{
|
{
|
||||||
case etichette:
|
case etichette:
|
||||||
{
|
{
|
||||||
TPrint_section& corpo = _form_eti->get_body();
|
TPrint_section& corpo = _form_eti->get_body();
|
||||||
for (int r=1;r<=_etcolonne;r++)
|
for (int r=1;r<=_etcolonne;r++)
|
||||||
{
|
{
|
||||||
if (current_cursor()->pos()<current_cursor()->items())
|
if (current_cursor()->pos()<current_cursor()->items())
|
||||||
{
|
{
|
||||||
bool avanza = TRUE;
|
bool avanza = TRUE;
|
||||||
while (avanza)
|
while (avanza)
|
||||||
{
|
{
|
||||||
if (current_cursor()->pos()<current_cursor()->items())
|
if (current_cursor()->pos()<current_cursor()->items())
|
||||||
avanza = !(preprocess_page(file, cnt));
|
avanza = !(preprocess_page(file, cnt));
|
||||||
else
|
else
|
||||||
avanza = FALSE;
|
avanza = FALSE;
|
||||||
if (avanza)
|
if (avanza)
|
||||||
++(*current_cursor());
|
++(*current_cursor());
|
||||||
}
|
}
|
||||||
force_setpage(TRUE);
|
force_setpage(TRUE);
|
||||||
TForm_item& cognome = corpo.find_field(ETI_COGNOME);
|
TForm_item& cognome = corpo.find_field(ETI_COGNOME);
|
||||||
cognome.set(_cognome_nome);
|
cognome.set(_cognome_nome);
|
||||||
corpo.update();
|
corpo.update();
|
||||||
for (word i = 0; i < corpo.height(); i++)
|
for (word i = 0; i < corpo.height(); i++)
|
||||||
{
|
{
|
||||||
TPrintrow& riga = corpo.row(i);
|
TPrintrow& riga = corpo.row(i);
|
||||||
TString256 riga1 = riga.row();
|
TString256 riga1 = riga.row();
|
||||||
riga1.cut(_etlarghezza);
|
riga1.cut(_etlarghezza);
|
||||||
int colonna = ((r-1)*_etlarghezza);
|
int colonna = ((r-1)*_etlarghezza);
|
||||||
TString16 formato;
|
TString16 formato;
|
||||||
formato << '@' << colonna << 'g';
|
formato << '@' << colonna << 'g';
|
||||||
riga1.insert(formato,0);
|
riga1.insert(formato,0);
|
||||||
set_row(i+1,riga1);
|
set_row(i+1,riga1);
|
||||||
}
|
}
|
||||||
if (r < _etcolonne)
|
if (r < _etcolonne)
|
||||||
{
|
{
|
||||||
bool avanza = TRUE;
|
bool avanza = TRUE;
|
||||||
while (avanza)
|
while (avanza)
|
||||||
{
|
{
|
||||||
++(*current_cursor());
|
++(*current_cursor());
|
||||||
if (current_cursor()->pos()<current_cursor()->items())
|
if (current_cursor()->pos()<current_cursor()->items())
|
||||||
avanza = !(preprocess_page(file, cnt));
|
avanza = !(preprocess_page(file, cnt));
|
||||||
else
|
else
|
||||||
avanza = FALSE;
|
avanza = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case completo:
|
case completo:
|
||||||
{
|
{
|
||||||
set_row(1,"@0g@pn", FLD(LF_SOGGETTI,SOG_CODICE,"########"));
|
set_row(1,"@0g@pn", FLD(LF_SOGGETTI,SOG_CODICE,"########"));
|
||||||
set_row(1,"@9g@S", FLD(LF_SOGGETTI,SOG_CATDON));
|
set_row(1,"@9g@S", FLD(LF_SOGGETTI,SOG_CATDON));
|
||||||
set_row(1,"@12g#a", &_cognome_nome);
|
set_row(1,"@12g#a", &_cognome_nome);
|
||||||
set_row(1,"@38g@ld", FLD(LF_SOGGETTI,SOG_DATANASC));
|
set_row(1,"@38g@ld", FLD(LF_SOGGETTI,SOG_DATANASC));
|
||||||
set_row(1,"@49g@S", FLD(LF_SOGGETTI,SOG_DOM_INDIR));
|
set_row(1,"@49g@S", FLD(LF_SOGGETTI,SOG_DOM_INDIR));
|
||||||
set_row(1,"@100g@S", FLD(LF_SOGGETTI,SOG_TELABI));
|
set_row(1,"@100g@S", FLD(LF_SOGGETTI,SOG_TELABI));
|
||||||
set_row(1,"@116g@S", FLD(LF_SOGGETTI,SOG_TELLAV));
|
set_row(1,"@116g@S", FLD(LF_SOGGETTI,SOG_TELLAV));
|
||||||
set_row(2,"@0g@S", FLD(LF_SOGGETTI,SOG_TESSAVIS));
|
set_row(2,"@0g@S", FLD(LF_SOGGETTI,SOG_TESSAVIS));
|
||||||
set_row(2,"@49g#a", &_dencom);
|
set_row(2,"@49g#a", &_dencom);
|
||||||
set_row(2,"@116g@S", FLD(LF_SOGGETTI,SOG_TELALT));
|
set_row(2,"@116g@S", FLD(LF_SOGGETTI,SOG_TELALT));
|
||||||
set_row(3,"@100g@pn", FLD(LF_SOGGETTI,SOG_TOTDON,"###"));
|
set_row(3,"@100g@pn", FLD(LF_SOGGETTI,SOG_TOTDON,"###"));
|
||||||
set_row(4,"");
|
set_row(4,"");
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case sintetico:
|
case sintetico:
|
||||||
{
|
{
|
||||||
set_row(1,"@0g#a", &_cognome_nome);
|
set_row(1,"@0g#a", &_cognome_nome);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TStampaBenxGAz::preprocess_page(int file, int counter)
|
bool TStampaBenxGAz::preprocess_page(int file, int counter)
|
||||||
{
|
{
|
||||||
if (_tipostampa==sintetico||_tipostampa==completo)
|
if (_tipostampa==sintetico||_tipostampa==completo)
|
||||||
{
|
{
|
||||||
TString80 nome = current_cursor()->curr(LF_SOGGETTI).get(SOG_COGNOME);
|
TString80 nome = current_cursor()->curr(LF_SOGGETTI).get(SOG_COGNOME);
|
||||||
nome << " ";
|
nome << " ";
|
||||||
nome << current_cursor()->curr(LF_SOGGETTI).get(SOG_NOME);
|
nome << current_cursor()->curr(LF_SOGGETTI).get(SOG_NOME);
|
||||||
_cognome_nome = nome;
|
_cognome_nome = nome;
|
||||||
TString256 localita = "";
|
TString256 localita = "";
|
||||||
localita = current_cursor()->curr(LF_SOGGETTI).get(SOG_DOM_CAP);
|
localita = current_cursor()->curr(LF_SOGGETTI).get(SOG_DOM_CAP);
|
||||||
localita << " ";
|
localita << " ";
|
||||||
if (current_cursor()->curr(LF_SOGGETTI).get(SOG_DOM_CODLOC).not_empty())
|
if (current_cursor()->curr(LF_SOGGETTI).get(SOG_DOM_CODLOC).not_empty())
|
||||||
{
|
{
|
||||||
localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S0");
|
localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S0");
|
||||||
localita << " - ";
|
localita << " - ";
|
||||||
}
|
}
|
||||||
localita << current_cursor()->curr(-ALIAS_COMDOM).get(COM_DENCOM);
|
localita << current_cursor()->curr(-ALIAS_COMDOM).get(COM_DENCOM);
|
||||||
localita.trim();
|
localita.trim();
|
||||||
_dencom = localita;
|
_dencom = localita;
|
||||||
// salto pagina se cambio punto di rottura
|
// salto pagina se cambio punto di rottura
|
||||||
TString16 grupponew;
|
TString16 grupponew;
|
||||||
if (app()._tiposta == 'S')
|
if (app()._tiposta == 'S')
|
||||||
grupponew = current_cursor()->curr(LF_SOGGETTI).get(SOG_GRUPPOAZIE);
|
grupponew = current_cursor()->curr(LF_SOGGETTI).get(SOG_GRUPPOAZIE);
|
||||||
else
|
else
|
||||||
grupponew = current_cursor()->curr().get(BEN_GRUPPOAZIE);
|
grupponew = current_cursor()->curr().get(BEN_GRUPPOAZIE);
|
||||||
if (grupponew != _gruppoold )
|
if (grupponew != _gruppoold )
|
||||||
{
|
{
|
||||||
if (_gruppoold != "**")
|
if (_gruppoold != "**")
|
||||||
footer_gruppo();
|
footer_gruppo();
|
||||||
_contatore = 0;
|
_contatore = 0;
|
||||||
_gruppoold = grupponew;
|
_gruppoold = grupponew;
|
||||||
header_gruppo(grupponew);
|
header_gruppo(grupponew);
|
||||||
_tipoold = "**";
|
_tipoold = "**";
|
||||||
}
|
}
|
||||||
TString16 tiponew = current_cursor()->curr().get(BEN_TIPOBEN);
|
TString16 tiponew = current_cursor()->curr().get(BEN_TIPOBEN);
|
||||||
if (tiponew != _tipoold)
|
if (tiponew != _tipoold)
|
||||||
{
|
{
|
||||||
TPrintrow riga;
|
TPrintrow riga;
|
||||||
printer().print(riga);
|
printer().print(riga);
|
||||||
riga.reset();
|
riga.reset();
|
||||||
riga.put(current_cursor()->curr(-ALIAS_BNZ).get("S0"));
|
riga.put(current_cursor()->curr(-ALIAS_BNZ).get("S0"));
|
||||||
_tipoold = tiponew;
|
_tipoold = tiponew;
|
||||||
if (printer().rows_left() < 3)
|
if (printer().rows_left() < 3)
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
printer().print(riga);
|
printer().print(riga);
|
||||||
riga.reset();
|
riga.reset();
|
||||||
printer().print(riga);
|
printer().print(riga);
|
||||||
}
|
}
|
||||||
if (printer().rows_left() < 4)
|
if (printer().rows_left() < 4)
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
}
|
}
|
||||||
if (_tipostampa==etichette)
|
if (_tipostampa==etichette)
|
||||||
if (printer().rows_left() < _form_eti->get_body().height())
|
if (printer().rows_left() < _form_eti->get_body().height())
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
_contatore++;
|
_contatore++;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TStampaBenxGAz::header_gruppo(const TString16 gruppo)
|
void TStampaBenxGAz::header_gruppo(const TString16 gruppo)
|
||||||
{
|
{
|
||||||
TString intestazione(132);
|
TString intestazione(132);
|
||||||
intestazione = "GRUPPO AZIENDALE ";
|
intestazione = "GRUPPO AZIENDALE ";
|
||||||
intestazione << gruppo;
|
intestazione << gruppo;
|
||||||
intestazione << " - ";
|
intestazione << " - ";
|
||||||
TTable gaz("GAZ");
|
TTable gaz("GAZ");
|
||||||
gaz.zero();
|
gaz.zero();
|
||||||
gaz.put("CODTAB",gruppo);
|
gaz.put("CODTAB",gruppo);
|
||||||
if (gaz.read() == NOERR)
|
if (gaz.read() == NOERR)
|
||||||
intestazione << gaz.get("S0");
|
intestazione << gaz.get("S0");
|
||||||
if (_tipostampa==completo)
|
if (_tipostampa==completo)
|
||||||
intestazione.center_just(132);
|
intestazione.center_just(132);
|
||||||
if (_tipostampa==sintetico)
|
if (_tipostampa==sintetico)
|
||||||
intestazione.left_just(132);
|
intestazione.left_just(132);
|
||||||
set_header(2,"@0g%s", (const char*) intestazione);
|
set_header(2,"@0g%s", (const char*) intestazione);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TStampaBenxGAz::set_print(int m)
|
bool TStampaBenxGAz::set_print(int m)
|
||||||
{
|
{
|
||||||
TPrinter& p = printer();
|
TPrinter& p = printer();
|
||||||
p.read_configuration();
|
p.read_configuration();
|
||||||
_tipostampa = undefined;
|
_tipostampa = undefined;
|
||||||
KEY tasto;
|
KEY tasto;
|
||||||
tasto = _msk->run();
|
tasto = _msk->run();
|
||||||
switch (tasto)
|
switch (tasto)
|
||||||
{
|
{
|
||||||
case F_SINTETICO:
|
case F_SINTETICO:
|
||||||
_tipostampa=sintetico;
|
_tipostampa=sintetico;
|
||||||
break;
|
break;
|
||||||
case F_COMPLETO:
|
case F_COMPLETO:
|
||||||
_tipostampa=completo;
|
_tipostampa=completo;
|
||||||
break;
|
break;
|
||||||
case F_ETICHETTE:
|
case F_ETICHETTE:
|
||||||
_tipostampa = (configura_stampante(p, "AT_ETICHETTE", "etichette")) ? etichette : undefined;
|
_tipostampa = (configura_stampante(p, "AT_ETICHETTE", "etichette")) ? etichette : undefined;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (_tipostampa != undefined)
|
if (_tipostampa != undefined)
|
||||||
{
|
{
|
||||||
if (_tipostampa == etichette)
|
if (_tipostampa == etichette)
|
||||||
_cognome_nome.set_width(200);
|
_cognome_nome.set_width(200);
|
||||||
if (_tipostampa == sintetico)
|
if (_tipostampa == sintetico)
|
||||||
_cognome_nome.set_width(51);
|
_cognome_nome.set_width(51);
|
||||||
_dataini = _msk->get_date(F_DATAINI);
|
_dataini = _msk->get_date(F_DATAINI);
|
||||||
_datafin = _msk->get_date(F_DATAFIN);
|
_datafin = _msk->get_date(F_DATAFIN);
|
||||||
_gruppoazie = _msk->get(F_GRUPPOAZIE);
|
_gruppoazie = _msk->get(F_GRUPPOAZIE);
|
||||||
_tiposta = _msk->get(F_TIPOSTA)[0];
|
_tiposta = _msk->get(F_TIPOSTA)[0];
|
||||||
TRectype da(LF_BENEM);
|
TRectype da(LF_BENEM);
|
||||||
TRectype a (LF_BENEM);
|
TRectype a (LF_BENEM);
|
||||||
if (_dataini.ok())
|
if (_dataini.ok())
|
||||||
da.put(BEN_DATABEN, _dataini);
|
da.put(BEN_DATABEN, _dataini);
|
||||||
if (_datafin.ok())
|
if (_datafin.ok())
|
||||||
a.put(BEN_DATABEN, _datafin);
|
a.put(BEN_DATABEN, _datafin);
|
||||||
TString80 chiave = "";
|
TString80 chiave = "";
|
||||||
if (_tiposta == 'S')
|
if (_tiposta == 'S')
|
||||||
chiave = "90->GRUPPOAZIE|94->TIPOBEN|UPPER(90->COGNOME)|UPPER(90->NOME)";
|
chiave = "90->GRUPPOAZIE|94->TIPOBEN|UPPER(90->COGNOME)|UPPER(90->NOME)";
|
||||||
else
|
else
|
||||||
chiave = "94->GRUPPOAZIE|94->TIPOBEN|UPPER(90->COGNOME)|UPPER(90->NOME)";
|
chiave = "94->GRUPPOAZIE|94->TIPOBEN|UPPER(90->COGNOME)|UPPER(90->NOME)";
|
||||||
_cur = add_cursor(new TSorted_cursor(_rel, (const char*) chiave, "", 2, &da, &a));
|
_cur = add_cursor(new TSorted_cursor(_rel, (const char*) chiave, "", 2, &da, &a));
|
||||||
TString80 filtro = "";
|
TString80 filtro = "";
|
||||||
if (_gruppoazie.not_empty())
|
if (_gruppoazie.not_empty())
|
||||||
{
|
{
|
||||||
if (_tiposta == 'S')
|
if (_tiposta == 'S')
|
||||||
filtro = format("(90->GRUPPOAZIE == \"%s\")",(const char*)_gruppoazie);
|
filtro = format("(90->GRUPPOAZIE == \"%s\")",(const char*)_gruppoazie);
|
||||||
else
|
else
|
||||||
filtro = format("(94->GRUPPOAZIE == \"%s\")",(const char*)_gruppoazie);
|
filtro = format("(94->GRUPPOAZIE == \"%s\")",(const char*)_gruppoazie);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (_tiposta == 'S')
|
if (_tiposta == 'S')
|
||||||
filtro = format("(90->GRUPPOAZIE != \"\")");
|
filtro = format("(90->GRUPPOAZIE != \"\")");
|
||||||
else
|
else
|
||||||
filtro = format("(94->GRUPPOAZIE != \"\")");
|
filtro = format("(94->GRUPPOAZIE != \"\")");
|
||||||
current_cursor()->setfilter((const char*) filtro, TRUE);
|
current_cursor()->setfilter((const char*) filtro, TRUE);
|
||||||
_contatore = 0;
|
_contatore = 0;
|
||||||
_gruppoold = "**";
|
_gruppoold = "**";
|
||||||
_tipoold = "**";
|
_tipoold = "**";
|
||||||
reset_files();
|
reset_files();
|
||||||
add_file(LF_BENEM);
|
add_file(LF_BENEM);
|
||||||
reset_print();
|
reset_print();
|
||||||
printer().footerlen(0);
|
printer().footerlen(0);
|
||||||
crea_intestazione();
|
crea_intestazione();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TStampaBenxGAz::crea_intestazione()
|
void TStampaBenxGAz::crea_intestazione()
|
||||||
{
|
{
|
||||||
reset_header();
|
reset_header();
|
||||||
if (_tipostampa==sintetico || _tipostampa==completo)
|
if (_tipostampa==sintetico || _tipostampa==completo)
|
||||||
{
|
{
|
||||||
TString sep(132);
|
TString sep(132);
|
||||||
sep = "STAMPA BENEMERENZE ATTRIBUITE dal ";
|
sep = "STAMPA BENEMERENZE ATTRIBUITE dal ";
|
||||||
sep << _dataini;
|
sep << _dataini;
|
||||||
sep << " al ";
|
sep << " al ";
|
||||||
sep << _datafin;
|
sep << _datafin;
|
||||||
if (_tipostampa==completo)
|
if (_tipostampa==completo)
|
||||||
sep.center_just(132);
|
sep.center_just(132);
|
||||||
if (_tipostampa==sintetico)
|
if (_tipostampa==sintetico)
|
||||||
sep.left_just(132);
|
sep.left_just(132);
|
||||||
set_header(1,"@0g%s", (const char*) sep);
|
set_header(1,"@0g%s", (const char*) sep);
|
||||||
sep = "Pag. @#";
|
sep = "Pag. @#";
|
||||||
if (_tipostampa==completo)
|
if (_tipostampa==completo)
|
||||||
set_header(2, "@110g%s", (const char*) sep);
|
set_header(2, "@110g%s", (const char*) sep);
|
||||||
if (_tipostampa==sintetico)
|
if (_tipostampa==sintetico)
|
||||||
set_header(2, "@60g%s", (const char*) sep);
|
set_header(2, "@60g%s", (const char*) sep);
|
||||||
sep = "";
|
sep = "";
|
||||||
sep.fill('-');
|
sep.fill('-');
|
||||||
if (_tipostampa==completo)
|
if (_tipostampa==completo)
|
||||||
{
|
{
|
||||||
set_header(3,"@0gCodice@9gC.@12gCognome e nome@38gNato il@49gIndirizzo@100gTelefono abit.@116gTelefono lavoro");
|
set_header(3,"@0gCodice@9gC.@12gCognome e nome@38gNato il@49gIndirizzo@100gTelefono abit.@116gTelefono lavoro");
|
||||||
set_header(4,"@0gTessera@49gCAP/Località/Comune/Prov.@116gTelefono altro");
|
set_header(4,"@0gTessera@49gCAP/Località/Comune/Prov.@116gTelefono altro");
|
||||||
set_header(5,"@100gTot.don.");
|
set_header(5,"@100gTot.don.");
|
||||||
set_header(6,"@0g--------@9g--@12g-------------------------@38g----------@49g--------------------------------------------------@100g---------------@116g---------------");
|
set_header(6,"@0g--------@9g--@12g-------------------------@38g----------@49g--------------------------------------------------@100g---------------@116g---------------");
|
||||||
}
|
}
|
||||||
printer().footerlen(3);
|
printer().footerlen(3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TStampaBenxGAz::user_create()
|
bool TStampaBenxGAz::user_create()
|
||||||
@ -371,7 +371,7 @@ bool TStampaBenxGAz::user_create()
|
|||||||
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 TEti_bengru_form(etformato);
|
_form_eti = new TEti_bengru_form(etformato);
|
||||||
_stampa80 = config.get_bool("Stampa80");
|
_stampa80 = config.get_bool("Stampa80");
|
||||||
_etictot = config.get_bool("EticTot");
|
_etictot = config.get_bool("EticTot");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -379,7 +379,7 @@ bool TStampaBenxGAz::user_create()
|
|||||||
|
|
||||||
bool TStampaBenxGAz::user_destroy()
|
bool TStampaBenxGAz::user_destroy()
|
||||||
{
|
{
|
||||||
delete _form_eti;
|
delete _form_eti;
|
||||||
delete _msk;
|
delete _msk;
|
||||||
delete _rel;
|
delete _rel;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
USE 90
|
USE 90
|
||||||
JOIN 13 INTO COM==DOM_CODCOM
|
JOIN 13 ALIAS 501 INTO COM==DOM_CODCOM
|
||||||
JOIN LCP ALIAS 100 INTO CODTAB==DOM_CODLOC
|
JOIN LCP ALIAS 100 INTO CODTAB==DOM_CODLOC
|
||||||
|
|
||||||
END
|
END
|
||||||
@ -72,7 +72,7 @@ STRINGA 7 30
|
|||||||
BEGIN
|
BEGIN
|
||||||
KEY "Denominazione localita' o comune"
|
KEY "Denominazione localita' o comune"
|
||||||
FIELD 100@->S0
|
FIELD 100@->S0
|
||||||
FIELD 13->DENCOM
|
FIELD 501@->DENCOM
|
||||||
PROMPT 0 0 ""
|
PROMPT 0 0 ""
|
||||||
FLAGS "H"
|
FLAGS "H"
|
||||||
MESSAGE RESET,9|COPY,9
|
MESSAGE RESET,9|COPY,9
|
||||||
|
Loading…
x
Reference in New Issue
Block a user