Patch level :

Files correlati     :
Ricompilazione Demo : [ ]
Commento            : Configura_stampante per etichette


git-svn-id: svn://10.65.10.50/trunk@7783 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
cris 1999-02-12 14:05:35 +00:00
parent c2724d13bd
commit 0b19fdebbc
3 changed files with 42 additions and 29 deletions

View File

@ -10,6 +10,7 @@
#include "at1.h"
#include "at1100a.h"
#include "atlib.h"
#define ALIAS_LCP 100
#define ALIAS_TCS 200
@ -185,20 +186,28 @@ bool TStampaDonBen::filter_func_donben(const TRelation* rel)
benem.put(BEN_TIPOBEN, app()._tipoben);
int err = benem.read();
filtrato = (err != NOERR);
}
if (filtrato && app()._definitiva)
}
return filtrato;
}
bool TStampaDonBen::preprocess_page(int file, int counter)
{
TRectype& recsog = current_cursor()->curr();
if (app()._definitiva)
{
long codice = recsog.get_long(SOG_CODICE);
TRectype* key = new TRectype(LF_BENEM);
key->put(BEN_CODICE, codice);
int err = app()._sbenemerenze->read(key);
if (err == NOERR)
if ((err==NOERR) || (err==_iseof) || (err==_isemptyfile))
{
int r = app()._sbenemerenze->rows();
TRectype& rec = app()._sbenemerenze->row(r+1,TRUE);
TString16 codsez = sog.get(SOG_CODSEZ);
TString16 codsot = sog.get(SOG_CODSOT);
TString16 gruppoazie = sog.get(SOG_GRUPPOAZIE);
TString16 codsez = recsog.get(SOG_CODSEZ);
TString16 codsot = recsog.get(SOG_CODSOT);
TString16 gruppoazie = recsog.get(SOG_GRUPPOAZIE);
rec.put(BEN_TIPOBEN, app()._tipoben);
//rec.put(BEN_DATAMAT, row.get(2));
@ -212,15 +221,9 @@ bool TStampaDonBen::filter_func_donben(const TRelation* rel)
rec.put(BEN_GRUPPOAZIE, gruppoazie);
int err = app()._sbenemerenze->rewrite();
}
}
return filtrato;
}
bool TStampaDonBen::preprocess_page(int file, int counter)
{
}
if (_tipostampa == elenco)
{
TRectype& recsog = current_cursor()->curr();
TString80 nome = recsog.get(SOG_COGNOME);
nome << " ";
nome << recsog.get(SOG_NOME);
@ -282,19 +285,23 @@ void TStampaDonBen::header_sezione(const TString16 codsez, const TString16 codso
bool TStampaDonBen::set_print(int m)
{
TPrinter& p = printer();
p.read_configuration();
_tipostampa = undefined;
KEY tasto;
tasto = _msk->run();
switch (tasto)
{
case F_ELENCO:
{
_tipostampa = elenco;
_codsez = "**";
_codsot = "**";
break;
}
break;
case F_ETICHETTE:
_tipostampa = etichette;
break;
_tipostampa = (configura_stampante(p, "AT_ETICHETTE", "etichette")) ? etichette : undefined;
break;
}
if (_tipostampa != undefined)
{

View File

@ -10,15 +10,16 @@
#include "at1.h"
#include "at1300a.h"
#include "atlib.h"
#define CAMPO_BENEM 10 // campo benemerenza in form per lettera
#define ALIAS_BNZ 600
#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_COMRES 502 // comune di residenza
//#define ALIAS_COMRES 502 // comune di residenza
#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 LET_BENEM 10 // campo benemerenza in form per lettera
@ -292,6 +293,8 @@ void TStampaBenemerenze::header_ben(const TString16 tipoben, const TString16 cod
bool TStampaBenemerenze::set_print(int m)
{
TPrinter& p = printer();
p.read_configuration();
_tipostampa = undefined;
KEY tasto;
tasto = _msk->run();
@ -304,11 +307,11 @@ bool TStampaBenemerenze::set_print(int m)
_tipostampa=completo;
break;
case F_ETICHETTE:
_tipostampa=etichette;
break;
case F_LETTERE:
_tipostampa = lettere;
break;
_tipostampa = (configura_stampante(p, "AT_ETICHETTE", "etichette")) ? etichette : undefined;
break;
case F_LETTERE:
_tipostampa = lettere;
break;
}
if (_tipostampa != undefined)
{
@ -475,11 +478,11 @@ bool TStampaBenemerenze::user_create()
_rel = new TRelation(LF_BENEM);
_rel->add(LF_SOGGETTI, "CODICE==CODICE");
_rel->add("BNZ", "CODTAB==TIPOBEN",1,0,ALIAS_BNZ);
_rel->add("LCP", "CODTAB==RES_CODLOC",1,LF_SOGGETTI,ALIAS_LCPRES);
//_rel->add("LCP", "CODTAB==RES_CODLOC",1,LF_SOGGETTI,ALIAS_LCPRES);
_rel->add("LCP", "CODTAB==DOM_CODLOC",1,LF_SOGGETTI,ALIAS_LCPDOM);
_rel->add(LF_COMUNI, "COM==RES_CODCOM",1,LF_SOGGETTI,ALIAS_COMRES);
//_rel->add(LF_COMUNI, "COM==RES_CODCOM",1,LF_SOGGETTI,ALIAS_COMRES);
_rel->add(LF_COMUNI, "COM==DOM_CODCOM",1,LF_SOGGETTI,ALIAS_COMDOM);
_rel->add(LF_COMUNI, "COM==COMNASC",1,LF_SOGGETTI,ALIAS_COMNAS);
//_rel->add(LF_COMUNI, "COM==COMNASC",1,LF_SOGGETTI,ALIAS_COMNAS);
//_rel->add(LF_SEZIONI, "CODSEZ==CODSEZ|CODSOT==CODSOT");
_sezioni = new TLocalisamfile(LF_SEZIONI);
_msk = new TMask("at1300a");

View File

@ -11,6 +11,7 @@
#include "at1.h"
#include "at1400a.h"
#include "atlib.h"
#define ALIAS_BNZ 600
#define ALIAS_GAZ 300
@ -250,6 +251,8 @@ void TStampaBenxGAz::header_gruppo(const TString16 gruppo)
bool TStampaBenxGAz::set_print(int m)
{
TPrinter& p = printer();
p.read_configuration();
_tipostampa = undefined;
KEY tasto;
tasto = _msk->run();
@ -262,8 +265,8 @@ bool TStampaBenxGAz::set_print(int m)
_tipostampa=completo;
break;
case F_ETICHETTE:
_tipostampa=etichette;
break;
_tipostampa = (configura_stampante(p, "AT_ETICHETTE", "etichette")) ? etichette : undefined;
break;
}
if (_tipostampa != undefined)
{