1997-06-17 15:50:08 +00:00
|
|
|
|
#include <form.h>
|
|
|
|
|
#include <mask.h>
|
2000-03-03 11:47:59 +00:00
|
|
|
|
#include <printapp.h>
|
1997-12-05 16:26:15 +00:00
|
|
|
|
#include <utility.h>
|
1997-06-17 15:50:08 +00:00
|
|
|
|
|
|
|
|
|
#include "soggetti.h"
|
1997-12-05 16:26:15 +00:00
|
|
|
|
#include "benem.h"
|
|
|
|
|
#include "donaz.h"
|
1998-08-12 11:00:26 +00:00
|
|
|
|
#include "famiglie.h"
|
1997-06-17 15:50:08 +00:00
|
|
|
|
#include "sezioni.h"
|
|
|
|
|
#include <comuni.h>
|
|
|
|
|
|
|
|
|
|
#include "at2.h"
|
|
|
|
|
#include "at2700a.h"
|
1999-01-26 14:18:25 +00:00
|
|
|
|
#include "atlib.h"
|
1997-06-17 15:50:08 +00:00
|
|
|
|
|
1997-12-05 16:26:15 +00:00
|
|
|
|
#include "at4100b.h"
|
|
|
|
|
#include "at4100c.h"
|
1997-06-17 15:50:08 +00:00
|
|
|
|
|
1997-12-05 16:26:15 +00:00
|
|
|
|
#define ALIAS_CTD 700 // categoria donatori
|
|
|
|
|
#define ALIAS_CTN1 701 // categoria non donatori 1
|
|
|
|
|
#define ALIAS_CTN2 702 // categoria non donatori 2
|
|
|
|
|
|
|
|
|
|
#define ALIAS_TCS 200 // tipi/esiti controlli sanitari
|
|
|
|
|
#define ALIAS_LDN 400 // punti di prelievo
|
1998-07-03 13:16:30 +00:00
|
|
|
|
#define ALIAS_LDNDON 401 // punti di prelievo
|
1997-12-05 16:26:15 +00:00
|
|
|
|
|
|
|
|
|
#define ALIAS_LCPDOM 100 // localita' postale di domicilio
|
|
|
|
|
#define ALIAS_COMDOM 501 // comune di domicilio
|
|
|
|
|
#define ALIAS_COMNAS 500 // comune di nascita
|
|
|
|
|
|
|
|
|
|
#define ALIAS_BNZ 600 // benemerenze
|
|
|
|
|
#define ALIAS_GAZ 300 // gruppi aziendale
|
|
|
|
|
|
1998-08-12 11:00:26 +00:00
|
|
|
|
#define ETI_COGNOME 3 // numero campo cognome e nome in etichetta (deve essere sempre cosi') per famiglie
|
1998-08-07 09:55:37 +00:00
|
|
|
|
|
2005-05-17 11:20:53 +00:00
|
|
|
|
enum ts { undefined=0, sintetico=1, completo=2, schede=3, etichette=4, cartoline=5, personale=6, notiziario=7, stampasufile=8, filepers=9};
|
1997-06-17 15:50:08 +00:00
|
|
|
|
|
|
|
|
|
// definizione form per etichette
|
|
|
|
|
class TEti_percat_form : public TForm
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
virtual TCursor* cursor() const;
|
|
|
|
|
virtual TRelation* relation() const;
|
|
|
|
|
TPrint_section& get_body() { return section('B'); } ;
|
1998-02-23 08:30:28 +00:00
|
|
|
|
TPrint_section& get_head() { return section('H'); } ;
|
|
|
|
|
TPrint_section& get_foot() { return section('F'); } ;
|
1997-06-17 15:50:08 +00:00
|
|
|
|
TEti_percat_form(): TForm() {};
|
|
|
|
|
TEti_percat_form(const char* form, const char * code = "", int editlevel = 0, const char* desc = "")
|
|
|
|
|
: TForm(form,code,editlevel,desc) {};
|
|
|
|
|
virtual ~TEti_percat_form() {};
|
|
|
|
|
};
|
|
|
|
|
|
1997-08-01 14:49:53 +00:00
|
|
|
|
class TStampaPerCategorie : public TPrintapp
|
1997-06-17 15:50:08 +00:00
|
|
|
|
{
|
|
|
|
|
static bool filter_func_percat(const TRelation* rel);
|
|
|
|
|
|
|
|
|
|
TRelation* _rel;
|
|
|
|
|
TMask* _msk;
|
1997-12-05 16:26:15 +00:00
|
|
|
|
TLocalisamfile* _benem;
|
|
|
|
|
TLocalisamfile* _donaz;
|
1998-08-12 11:00:26 +00:00
|
|
|
|
TLocalisamfile* _famiglie;
|
2000-03-03 11:47:59 +00:00
|
|
|
|
TExternisamfile* _file;
|
2005-05-17 11:20:53 +00:00
|
|
|
|
TExternisamfile* _filepers;
|
1997-12-05 16:26:15 +00:00
|
|
|
|
TRecord_array* _sbenemerenze;
|
1998-08-12 11:00:26 +00:00
|
|
|
|
TRecord_array* _sfamiglia;
|
1997-06-17 15:50:08 +00:00
|
|
|
|
TEti_percat_form* _form_eti;
|
1999-01-26 14:18:25 +00:00
|
|
|
|
TEti_percat_form* _form_neti;
|
1997-12-05 16:26:15 +00:00
|
|
|
|
TEti_percat_form* _form_car;
|
|
|
|
|
TEti_percat_form* _form_sch;
|
1998-02-23 08:30:28 +00:00
|
|
|
|
TEti_percat_form* _form_per;
|
1997-06-17 15:50:08 +00:00
|
|
|
|
TAssoc_array _catdon;
|
|
|
|
|
TAssoc_array _catnondon;
|
1998-08-12 11:00:26 +00:00
|
|
|
|
TAssoc_array _codfamiglie;
|
1997-12-05 16:26:15 +00:00
|
|
|
|
TParagraph_string _cognome_nome, _dencom, _benemerenza;
|
|
|
|
|
TString80 _rigastampa;
|
1997-06-17 15:50:08 +00:00
|
|
|
|
TDate _data_stampa;
|
1997-12-05 16:26:15 +00:00
|
|
|
|
ts _tipostampa;
|
|
|
|
|
TString16 _lettini, _lettfin, _capini, _capfin;
|
|
|
|
|
TString16 _gruppoazie, _gruppoold;
|
2000-05-03 10:04:40 +00:00
|
|
|
|
bool _pergruppo, _perfamiglie, _nosottogruppo;
|
1999-01-26 14:18:25 +00:00
|
|
|
|
long _contatore;
|
1997-12-05 16:26:15 +00:00
|
|
|
|
TString16 _codsez, _codsot, _orario, _datacart;
|
|
|
|
|
TString80 _invitoper, _data, _presso1, _presso2, _presso3, _presso4;
|
|
|
|
|
TString80 _note, _intest1, _intest2, _intest3, _intest4;
|
|
|
|
|
bool _usomodo, _usasez;
|
2003-12-03 09:31:34 +00:00
|
|
|
|
int _schxpag, _lenpage, _etnlarghezza, _etncolonne;
|
|
|
|
|
int _etlarghezza, _etcolonne, _etrighe, _etbordoini, _etbordofin, _netichette;
|
2004-04-21 08:14:21 +00:00
|
|
|
|
int _caxpag, _cabordoini, _cabordofin, _ncartoline;
|
2009-12-30 15:45:28 +00:00
|
|
|
|
bool _stampa80, _etictot;
|
1997-06-17 15:50:08 +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);
|
2009-12-30 15:45:28 +00:00
|
|
|
|
bool filepers_put(const char* nomecampo, const char* valore);
|
1997-06-17 15:50:08 +00:00
|
|
|
|
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);
|
|
|
|
|
ts dati_cartolina();
|
1997-06-17 15:50:08 +00:00
|
|
|
|
|
|
|
|
|
public:
|
1997-12-05 16:26:15 +00:00
|
|
|
|
void dati_sezione(const TString16 codsez, const TString16 codsot);
|
1997-06-17 15:50:08 +00:00
|
|
|
|
void crea_intestazione();
|
|
|
|
|
void filtra_sezioni();
|
1997-12-05 16:26:15 +00:00
|
|
|
|
void header_gruppo(const TString16 gruppo);
|
|
|
|
|
void footer_gruppo();
|
1997-06-17 15:50:08 +00:00
|
|
|
|
void header_sezione(const TString16 codsez, const TString16 codsot);
|
1997-12-05 16:26:15 +00:00
|
|
|
|
void footer_sezione();
|
1997-06-17 15:50:08 +00:00
|
|
|
|
TMask& app_mask() { return *_msk; }
|
|
|
|
|
|
1997-12-05 16:26:15 +00:00
|
|
|
|
TStampaPerCategorie() : _data_stampa(TODAY), _cognome_nome("",25), _dencom("",30), _benemerenza("",11) {}
|
1997-06-17 15:50:08 +00:00
|
|
|
|
};
|
|
|
|
|
|
2009-12-30 15:45:28 +00:00
|
|
|
|
|
1997-08-01 14:49:53 +00:00
|
|
|
|
HIDDEN inline TStampaPerCategorie& app() { return (TStampaPerCategorie&) main_app(); }
|
1997-06-17 15:50:08 +00:00
|
|
|
|
|
|
|
|
|
TCursor* TEti_percat_form::cursor() const { return app().current_cursor(); }
|
|
|
|
|
|
|
|
|
|
TRelation* TEti_percat_form::relation() const { return cursor()->relation(); }
|
|
|
|
|
|
2009-12-30 15:45:28 +00:00
|
|
|
|
static int compare_benem(const TObject** o1, const TObject** o2)
|
|
|
|
|
{
|
|
|
|
|
TRectype* r1 = (TRectype*)*o1;
|
|
|
|
|
TRectype* r2 = (TRectype*)*o2;
|
|
|
|
|
|
|
|
|
|
const TString b1(r1->get(BEN_TIPOBEN));
|
|
|
|
|
const TString b2(r2->get(BEN_TIPOBEN));
|
|
|
|
|
|
|
|
|
|
int b=0;
|
|
|
|
|
if (b1>b2) b=+1;
|
|
|
|
|
else
|
|
|
|
|
if (b1<b2) b=-1;
|
|
|
|
|
return b;
|
|
|
|
|
}
|
|
|
|
|
|
1997-12-05 16:26:15 +00:00
|
|
|
|
void TStampaPerCategorie::dati_sezione(const TString16 codsez, const TString16 codsot)
|
|
|
|
|
{
|
|
|
|
|
_intest1 = current_cursor()->curr(LF_SEZIONI).get(SEZ_INTESTAZ1);
|
|
|
|
|
_intest2 = current_cursor()->curr(LF_SEZIONI).get(SEZ_INTESTAZ2);
|
|
|
|
|
_intest3 = current_cursor()->curr(LF_SEZIONI).get(SEZ_INTESTAZ3);
|
|
|
|
|
_intest4 = current_cursor()->curr(LF_SEZIONI).get(SEZ_INTESTAZ4);
|
|
|
|
|
if (_usasez)
|
|
|
|
|
{
|
|
|
|
|
if (_presso1.blank())
|
|
|
|
|
{
|
|
|
|
|
_presso1 = current_cursor()->curr(LF_SEZIONI).get(SEZ_CONVSEDE1);
|
|
|
|
|
_presso2 = current_cursor()->curr(LF_SEZIONI).get(SEZ_CONVSEDE2);
|
|
|
|
|
_presso3 = current_cursor()->curr(LF_SEZIONI).get(SEZ_CONVSEDE3);
|
|
|
|
|
_presso4 = current_cursor()->curr(LF_SEZIONI).get(SEZ_CONVSEDE4);
|
|
|
|
|
}
|
|
|
|
|
if (_orario.blank())
|
|
|
|
|
_orario = current_cursor()->curr(LF_SEZIONI).get(SEZ_CONVORA);
|
|
|
|
|
if (_note.blank())
|
|
|
|
|
_note = current_cursor()->curr(LF_SEZIONI).get(SEZ_CONVNOTE);
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ts TStampaPerCategorie::dati_cartolina()
|
|
|
|
|
{
|
|
|
|
|
TMask msk("at4100b");
|
|
|
|
|
if (msk.run() == K_ENTER)
|
|
|
|
|
{
|
|
|
|
|
_invitoper = msk.get(F_INVITOPER);
|
|
|
|
|
_data = msk.get(F_DATA);
|
|
|
|
|
_presso1 = msk.get(F_PRESSO1);
|
|
|
|
|
_presso2 = msk.get(F_PRESSO2);
|
|
|
|
|
_presso3 = msk.get(F_PRESSO3);
|
|
|
|
|
_presso4 = msk.get(F_PRESSO4);
|
|
|
|
|
_datacart = msk.get(F_DATACART);
|
|
|
|
|
_orario = msk.get(F_ORARIO);
|
|
|
|
|
_note = msk.get(F_NOTE);
|
|
|
|
|
_usasez = msk.get_bool(F_USASEZ);
|
|
|
|
|
return cartoline;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
return undefined;
|
|
|
|
|
}
|
|
|
|
|
|
1997-08-01 14:49:53 +00:00
|
|
|
|
void TStampaPerCategorie::filtra_sezioni()
|
1997-06-17 15:50:08 +00:00
|
|
|
|
{
|
|
|
|
|
const TString16 sezini = _msk->get(F_SEZINI);
|
|
|
|
|
const TString16 sotini = _msk->get(F_SOTINI);
|
|
|
|
|
const TString16 sezfin = _msk->get(F_SEZFIN);
|
|
|
|
|
const TString16 sotfin = _msk->get(F_SOTFIN);
|
|
|
|
|
TRectype da(LF_SOGGETTI);
|
|
|
|
|
TRectype a(LF_SOGGETTI);
|
|
|
|
|
if (sezini.not_empty())
|
|
|
|
|
da.put(SOG_CODSEZ, sezini);
|
|
|
|
|
if (sotini.not_empty())
|
|
|
|
|
da.put(SOG_CODSOT, sotini);
|
|
|
|
|
if (sezfin.not_empty())
|
|
|
|
|
a.put(SOG_CODSEZ, sezfin);
|
|
|
|
|
if (sotfin.not_empty())
|
|
|
|
|
a.put(SOG_CODSOT, sotfin);
|
|
|
|
|
current_cursor()->setregion(da, a);
|
|
|
|
|
}
|
|
|
|
|
|
1997-12-05 16:26:15 +00:00
|
|
|
|
void TStampaPerCategorie::footer_gruppo()
|
|
|
|
|
{
|
|
|
|
|
// stampa totale soggetti appartenenti al gruppo
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if ((_tipostampa==etichette || _tipostampa==notiziario) && _etictot)
|
|
|
|
|
{
|
|
|
|
|
TPrint_section& corpo = _form_eti->get_body();
|
|
|
|
|
if (_tipostampa==notiziario)
|
|
|
|
|
corpo = _form_neti->get_body();
|
|
|
|
|
TPrintrow riga;
|
|
|
|
|
for (word i = 0; i < corpo.height(); i++)
|
|
|
|
|
{
|
|
|
|
|
riga.reset();
|
|
|
|
|
if (i==0)
|
|
|
|
|
{
|
|
|
|
|
TString80 totale = format("TOTALE %d", _contatore);
|
|
|
|
|
riga.put(totale);
|
|
|
|
|
}
|
|
|
|
|
printer().print(riga);
|
|
|
|
|
}
|
1998-08-07 09:55:37 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
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-12-05 16:26:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
print_action TStampaPerCategorie::postprocess_print(int file, int counter)
|
|
|
|
|
{
|
|
|
|
|
if (_contatore > 0)
|
|
|
|
|
{
|
|
|
|
|
if (_pergruppo)
|
|
|
|
|
footer_gruppo();
|
|
|
|
|
else
|
|
|
|
|
footer_sezione();
|
|
|
|
|
}
|
1998-02-16 13:45:58 +00:00
|
|
|
|
if ((_tipostampa == schede) && (_schxpag > 1))
|
|
|
|
|
printer().formlen(_lenpage);
|
1997-12-05 16:26:15 +00:00
|
|
|
|
return NEXT_PAGE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TStampaPerCategorie::footer_sezione()
|
|
|
|
|
{
|
|
|
|
|
// stampa totale soggetti appartenenti alla sezione
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if ((_tipostampa==etichette || _tipostampa==notiziario) && _etictot)
|
|
|
|
|
{
|
|
|
|
|
TPrint_section& corpo = _form_eti->get_body();
|
|
|
|
|
if (_tipostampa==notiziario)
|
|
|
|
|
corpo = _form_neti->get_body();
|
|
|
|
|
TPrintrow riga;
|
|
|
|
|
for (word i = 0; i < corpo.height(); i++)
|
|
|
|
|
{
|
|
|
|
|
riga.reset();
|
|
|
|
|
if (i==0)
|
|
|
|
|
{
|
|
|
|
|
TString80 totale = format("TOTALE %d", _contatore);
|
|
|
|
|
riga.put(totale);
|
|
|
|
|
}
|
|
|
|
|
printer().print(riga);
|
|
|
|
|
}
|
1998-08-07 09:55:37 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
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-12-05 16:26:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TStampaPerCategorie::header_gruppo(const TString16 gruppo)
|
|
|
|
|
{
|
|
|
|
|
TString intestazione(132);
|
|
|
|
|
intestazione = "GRUPPO AZIENDALE ";
|
|
|
|
|
intestazione << gruppo;
|
|
|
|
|
intestazione << " - ";
|
|
|
|
|
intestazione << current_cursor()->curr(-ALIAS_GAZ).get("S0");
|
|
|
|
|
if (_stampa80)
|
|
|
|
|
intestazione.center_just(80);
|
|
|
|
|
else
|
|
|
|
|
intestazione.center_just(132);
|
|
|
|
|
set_header(1,"@0g%s", (const char*) intestazione);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
1997-08-01 14:49:53 +00:00
|
|
|
|
void TStampaPerCategorie::set_page(int file, int cnt)
|
1997-06-17 15:50:08 +00:00
|
|
|
|
{
|
1997-12-05 16:26:15 +00:00
|
|
|
|
switch (_tipostampa)
|
1997-06-17 15:50:08 +00:00
|
|
|
|
{
|
|
|
|
|
case etichette:
|
1997-12-05 16:26:15 +00:00
|
|
|
|
{
|
1997-06-17 15:50:08 +00:00
|
|
|
|
TPrint_section& corpo = _form_eti->get_body();
|
1997-12-05 16:26:15 +00:00
|
|
|
|
for (int r=1;r<=_etcolonne;r++)
|
|
|
|
|
{
|
|
|
|
|
if (current_cursor()->pos()<current_cursor()->items())
|
|
|
|
|
{
|
1998-08-12 11:00:26 +00:00
|
|
|
|
bool avanza = TRUE;
|
|
|
|
|
while (avanza)
|
|
|
|
|
{
|
|
|
|
|
if (current_cursor()->pos()<current_cursor()->items())
|
|
|
|
|
avanza = !(preprocess_page(file, cnt));
|
|
|
|
|
else
|
|
|
|
|
avanza = FALSE;
|
1998-09-25 13:05:55 +00:00
|
|
|
|
if (avanza)
|
1998-08-12 11:00:26 +00:00
|
|
|
|
++(*current_cursor());
|
|
|
|
|
}
|
1997-12-05 16:26:15 +00:00
|
|
|
|
force_setpage(TRUE);
|
1998-08-12 11:00:26 +00:00
|
|
|
|
TForm_item& cognome = corpo.find_field(ETI_COGNOME);
|
|
|
|
|
cognome.set(_cognome_nome);
|
1998-09-25 13:05:55 +00:00
|
|
|
|
corpo.update();
|
2003-12-03 09:31:34 +00:00
|
|
|
|
_contatore++;
|
|
|
|
|
_netichette++;
|
|
|
|
|
int nriga = 1;
|
|
|
|
|
if (_etrighe > 0)
|
|
|
|
|
{
|
|
|
|
|
int resto = _netichette % (_etrighe*_etcolonne);
|
|
|
|
|
if (resto > 0 && resto <= _etcolonne)
|
|
|
|
|
nriga = nriga+_etbordoini;
|
|
|
|
|
}
|
1997-12-05 16:26:15 +00:00
|
|
|
|
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;
|
1998-05-11 09:46:37 +00:00
|
|
|
|
formato << '@' << colonna << 'g';
|
1997-12-05 16:26:15 +00:00
|
|
|
|
riga1.insert(formato,0);
|
2003-12-03 09:31:34 +00:00
|
|
|
|
set_row(nriga++,riga1);
|
1997-12-05 16:26:15 +00:00
|
|
|
|
}
|
|
|
|
|
if (r < _etcolonne)
|
1998-08-12 11:00:26 +00:00
|
|
|
|
{
|
|
|
|
|
bool avanza = TRUE;
|
|
|
|
|
while (avanza)
|
|
|
|
|
{
|
|
|
|
|
++(*current_cursor());
|
|
|
|
|
if (current_cursor()->pos()<current_cursor()->items())
|
|
|
|
|
avanza = !(preprocess_page(file, cnt));
|
|
|
|
|
else
|
|
|
|
|
avanza = FALSE;
|
|
|
|
|
}
|
1998-08-07 09:55:37 +00:00
|
|
|
|
}
|
1997-12-05 16:26:15 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
1999-01-26 14:18:25 +00:00
|
|
|
|
case notiziario:
|
|
|
|
|
{
|
|
|
|
|
TPrint_section& corpo = _form_neti->get_body();
|
|
|
|
|
for (int r=1;r<=_etncolonne;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();
|
|
|
|
|
_contatore++;
|
|
|
|
|
for (word i = 0; i < corpo.height(); i++)
|
|
|
|
|
{
|
|
|
|
|
TPrintrow& riga = corpo.row(i);
|
|
|
|
|
TString256 riga1 = riga.row();
|
|
|
|
|
riga1.cut(_etnlarghezza);
|
|
|
|
|
int colonna = ((r-1)*_etnlarghezza);
|
|
|
|
|
TString16 formato;
|
|
|
|
|
formato << '@' << colonna << 'g';
|
|
|
|
|
riga1.insert(formato,0);
|
|
|
|
|
set_row(i+1,riga1);
|
|
|
|
|
}
|
|
|
|
|
if (r < _etncolonne)
|
|
|
|
|
{
|
|
|
|
|
bool avanza = TRUE;
|
|
|
|
|
while (avanza)
|
|
|
|
|
{
|
|
|
|
|
++(*current_cursor());
|
|
|
|
|
if (current_cursor()->pos()<current_cursor()->items())
|
|
|
|
|
avanza = !(preprocess_page(file, cnt));
|
|
|
|
|
else
|
|
|
|
|
avanza = FALSE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
1998-02-23 08:30:28 +00:00
|
|
|
|
case personale:
|
|
|
|
|
{
|
|
|
|
|
TPrint_section& corpo = _form_per->get_body();
|
|
|
|
|
force_setpage(TRUE);
|
|
|
|
|
corpo.update();
|
1998-05-11 09:46:37 +00:00
|
|
|
|
TString riga1;
|
1998-02-23 08:30:28 +00:00
|
|
|
|
for (word i = 0; i < corpo.height(); i++)
|
|
|
|
|
{
|
|
|
|
|
TPrintrow& riga = corpo.row(i);
|
1998-05-11 09:46:37 +00:00
|
|
|
|
riga1 = riga.row();
|
1998-02-23 08:30:28 +00:00
|
|
|
|
set_row(i+1,riga1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//force_setpage(TRUE);
|
|
|
|
|
//corpo.update_and_print(TRUE);
|
|
|
|
|
}
|
|
|
|
|
break;
|
1997-12-05 16:26:15 +00:00
|
|
|
|
case schede:
|
|
|
|
|
{
|
|
|
|
|
TPrint_section& corpo = _form_sch->get_body();
|
1998-08-07 09:55:37 +00:00
|
|
|
|
corpo.update_and_print(printmode_normal, TRUE);
|
1997-12-05 16:26:15 +00:00
|
|
|
|
force_setpage(TRUE);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case cartoline:
|
|
|
|
|
{
|
|
|
|
|
TPrint_section& corpo = _form_car->get_body();
|
|
|
|
|
const TString16 codsez = current_cursor()->curr().get(SOG_CODSEZ);
|
|
|
|
|
const TString16 codsot = current_cursor()->curr().get(SOG_CODSOT);
|
|
|
|
|
if ((_codsez!=codsez)||(_codsot!=codsot))
|
|
|
|
|
{
|
|
|
|
|
_codsez = codsez;
|
|
|
|
|
_codsot = codsot;
|
|
|
|
|
dati_sezione(codsez, codsot);
|
|
|
|
|
corpo.reset();
|
|
|
|
|
TForm_item& intest1 = corpo.find_field(CAR_INTEST1);
|
|
|
|
|
intest1.set(_intest1);
|
|
|
|
|
TForm_item& intest2 = corpo.find_field(CAR_INTEST2);
|
|
|
|
|
intest2.set(_intest2);
|
|
|
|
|
TForm_item& intest3 = corpo.find_field(CAR_INTEST3);
|
|
|
|
|
intest3.set(_intest3);
|
|
|
|
|
TForm_item& intest4 = corpo.find_field(CAR_INTEST4);
|
|
|
|
|
intest4.set(_intest4);
|
|
|
|
|
TForm_item& invito = corpo.find_field(CAR_INVITOPER);
|
|
|
|
|
invito.set(_invitoper);
|
|
|
|
|
TForm_item& data = corpo.find_field(CAR_DATA);
|
|
|
|
|
data.set(_data);
|
|
|
|
|
TForm_item& presso1 = corpo.find_field(CAR_PRESSO1);
|
|
|
|
|
presso1.set(_presso1);
|
|
|
|
|
TForm_item& presso2 = corpo.find_field(CAR_PRESSO2);
|
|
|
|
|
presso2.set(_presso2);
|
|
|
|
|
TForm_item& presso3 = corpo.find_field(CAR_PRESSO3);
|
|
|
|
|
presso3.set(_presso3);
|
|
|
|
|
TForm_item& presso4 = corpo.find_field(CAR_PRESSO4);
|
|
|
|
|
presso4.set(_presso4);
|
|
|
|
|
TForm_item& orario = corpo.find_field(CAR_ORARIO);
|
|
|
|
|
orario.set(_orario);
|
|
|
|
|
TForm_item& datacart = corpo.find_field(CAR_DATACART);
|
|
|
|
|
datacart.set(_datacart);
|
|
|
|
|
TForm_item& note = corpo.find_field(CAR_NOTE);
|
|
|
|
|
note.set(_note);
|
|
|
|
|
}
|
1997-06-17 15:50:08 +00:00
|
|
|
|
corpo.update();
|
2004-04-21 08:14:21 +00:00
|
|
|
|
word primariga = 0;
|
|
|
|
|
word ultimariga = corpo.height();
|
|
|
|
|
if (_caxpag > 0)
|
|
|
|
|
{
|
|
|
|
|
if (_ncartoline % _caxpag == 0) // numero cartoline per pagina
|
|
|
|
|
primariga = _cabordoini; // bordo iniziale
|
|
|
|
|
if (_ncartoline % _caxpag == _caxpag-1) // numero cartoline per pagina - 1
|
|
|
|
|
ultimariga -= _cabordofin; // bordo finale
|
|
|
|
|
}
|
|
|
|
|
int nriga = 1;
|
|
|
|
|
for (word i = primariga; i < ultimariga; i++)
|
1997-12-05 16:26:15 +00:00
|
|
|
|
{
|
|
|
|
|
TPrintrow& riga = corpo.row(i);
|
2004-04-21 08:14:21 +00:00
|
|
|
|
set_row(nriga++,riga);
|
1997-06-17 15:50:08 +00:00
|
|
|
|
}
|
2000-11-22 10:12:52 +00:00
|
|
|
|
force_setpage(TRUE);
|
2004-04-21 08:14:21 +00:00
|
|
|
|
_ncartoline++;
|
1997-06-17 15:50:08 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
1997-12-05 16:26:15 +00:00
|
|
|
|
case sintetico:
|
1997-06-17 15:50:08 +00:00
|
|
|
|
{
|
1998-05-25 13:20:15 +00:00
|
|
|
|
if (_stampa80)
|
|
|
|
|
{
|
|
|
|
|
set_row(1,"@0g@pn", FLD(LF_SOGGETTI,SOG_CODICE,"########"));
|
|
|
|
|
set_row(2,"@0g@8,rs", FLD(LF_SOGGETTI,SOG_TESSAVIS));
|
|
|
|
|
set_row(3,"@0g@8,rs", FLD(LF_SOGGETTI,SOG_CATDON));
|
|
|
|
|
set_row(1,"@9g#a", &_cognome_nome);
|
|
|
|
|
set_row(3,"@9g@ld", FLD(LF_SOGGETTI,SOG_DATANASC));
|
|
|
|
|
set_row(1,"@35g@S", FLD(LF_SOGGETTI,SOG_DOM_INDIR));
|
|
|
|
|
set_row(2,"@35g#a", &_dencom);
|
|
|
|
|
set_row(1,"@67g@S", FLD(LF_SOGGETTI,SOG_TELABI));
|
|
|
|
|
set_row(2,"@67g@S", FLD(LF_SOGGETTI,SOG_TELLAV));
|
|
|
|
|
set_row(3,"@67g@S", FLD(LF_SOGGETTI,SOG_TELALT));
|
|
|
|
|
set_row(4,"");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
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@8,rs", FLD(LF_SOGGETTI,SOG_TESSAVIS));
|
|
|
|
|
set_row(2,"@49g#a", &_dencom);
|
|
|
|
|
set_row(2,"@116g@S", FLD(LF_SOGGETTI,SOG_TELALT));
|
|
|
|
|
set_row(3,"");
|
|
|
|
|
}
|
1997-12-05 16:26:15 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case completo:
|
|
|
|
|
{
|
|
|
|
|
if (_stampa80)
|
|
|
|
|
{
|
|
|
|
|
set_row(1,"@0g@pn", FLD(LF_SOGGETTI,SOG_CODICE,"########"));
|
|
|
|
|
set_row(2,"@0g@8,rs", FLD(LF_SOGGETTI,SOG_TESSAVIS));
|
|
|
|
|
set_row(3,"@0g@8,rs", FLD(LF_SOGGETTI,SOG_CATDON));
|
|
|
|
|
|
|
|
|
|
set_row(1,"@9g@S",FLD(LF_SOGGETTI,SOG_COGNOME));
|
|
|
|
|
set_row(2,"@9g@S",FLD(LF_SOGGETTI,SOG_NOME));
|
|
|
|
|
set_row(3,"@9g@ld", FLD(LF_SOGGETTI,SOG_DATANASC));
|
|
|
|
|
set_row(4,"@9g@S", FLD(LF_SOGGETTI,SOG_DOM_INDIR));
|
|
|
|
|
set_row(5,"@9g#a", &_dencom);
|
|
|
|
|
|
|
|
|
|
set_row(1,"@40g@S", FLD(LF_SOGGETTI,SOG_TELABI));
|
|
|
|
|
set_row(2,"@40g@S", FLD(LF_SOGGETTI,SOG_TELLAV));
|
|
|
|
|
set_row(3,"@40g@S", FLD(LF_SOGGETTI,SOG_TELALT));
|
|
|
|
|
set_row(4,"@40g@S", FLD(LF_SOGGETTI,SOG_GRUPPOAZIE));
|
|
|
|
|
set_row(5,"@40g@S", FLD(LF_SOGGETTI,SOG_PROFESS));
|
|
|
|
|
|
|
|
|
|
set_row(1,"@56gGr @S", FLD(LF_SOGGETTI,SOG_GRUPPOAB0));
|
|
|
|
|
set_row(2,"@56gRh @S", FLD(LF_SOGGETTI,SOG_RHANTID));
|
|
|
|
|
set_row(3,"@56gFe @S", FLD(LF_SOGGETTI,SOG_FENOTIPORH));
|
|
|
|
|
set_row(4,"@56gKe @S", FLD(LF_SOGGETTI,SOG_KELL));
|
|
|
|
|
set_row(5,"@56gDu @S", FLD(LF_SOGGETTI,SOG_DU));
|
|
|
|
|
|
|
|
|
|
set_row(1,"@66g@S", FLD(LF_SOGGETTI,SOG_DATAULTDON));
|
|
|
|
|
set_row(2,"@70g@n", FLD(LF_SOGGETTI,SOG_TOTDON));
|
|
|
|
|
set_row(3,"@66g@S", FLD(LF_SOGGETTI,SOG_DATAISC));
|
|
|
|
|
set_row(4,"@66g#a", &_benemerenza);
|
|
|
|
|
|
|
|
|
|
set_row(1,"@77g@S", FLD(LF_SOGGETTI,SOG_STATO));
|
|
|
|
|
set_row(2,"@77g@S", FLD(LF_SOGGETTI,SOG_IDON1));
|
|
|
|
|
set_row(3,"@77g@S", FLD(LF_SOGGETTI,SOG_IDON2));
|
|
|
|
|
set_row(4,"@77g@S", FLD(LF_SOGGETTI,SOG_IDON3));
|
|
|
|
|
set_row(5,"@77g@S", FLD(LF_SOGGETTI,SOG_IDON4));
|
2004-05-06 11:37:17 +00:00
|
|
|
|
|
|
|
|
|
set_row(1,"@80g@pn", FLD(LF_SOGGETTI,SOG_INTSI,"###"));
|
|
|
|
|
set_row(2,"@80g@pn", FLD(LF_SOGGETTI,SOG_INTAF,"###"));
|
|
|
|
|
|
1997-12-05 16:26:15 +00:00
|
|
|
|
set_row(6,"");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
set_row(1,"@0g@pn", FLD(LF_SOGGETTI,SOG_CODICE,"########"));
|
|
|
|
|
set_row(2,"@0g@8,rs", FLD(LF_SOGGETTI,SOG_TESSAVIS));
|
|
|
|
|
set_row(3,"@0g@8,rs", FLD(LF_SOGGETTI,SOG_CATDON));
|
|
|
|
|
|
|
|
|
|
set_row(1,"@9g@S",FLD(LF_SOGGETTI,SOG_COGNOME));
|
|
|
|
|
set_row(2,"@9g@S",FLD(LF_SOGGETTI,SOG_NOME));
|
|
|
|
|
set_row(3,"@9g@ld", FLD(LF_SOGGETTI,SOG_DATANASC));
|
1998-05-11 09:46:37 +00:00
|
|
|
|
set_row(4,"@9g@S", FLD(-ALIAS_COMNAS,COM_DENCOM));
|
1997-12-05 16:26:15 +00:00
|
|
|
|
|
|
|
|
|
set_row(1,"@35g@S", FLD(LF_SOGGETTI,SOG_DOM_INDIR));
|
|
|
|
|
set_row(2,"@35g#a", &_dencom);
|
|
|
|
|
|
|
|
|
|
set_row(1,"@66g@S", FLD(LF_SOGGETTI,SOG_TELABI));
|
|
|
|
|
set_row(2,"@66g@S", FLD(LF_SOGGETTI,SOG_TELLAV));
|
|
|
|
|
set_row(3,"@66g@S", FLD(LF_SOGGETTI,SOG_TELALT));
|
|
|
|
|
set_row(4,"@66g@S", FLD(LF_SOGGETTI,SOG_GRUPPOAZIE));
|
|
|
|
|
set_row(5,"@66g@S", FLD(LF_SOGGETTI,SOG_PROFESS));
|
|
|
|
|
|
|
|
|
|
set_row(1,"@82gGr @S", FLD(LF_SOGGETTI,SOG_GRUPPOAB0));
|
|
|
|
|
set_row(2,"@82gRh @S", FLD(LF_SOGGETTI,SOG_RHANTID));
|
|
|
|
|
set_row(3,"@82gFe @S", FLD(LF_SOGGETTI,SOG_FENOTIPORH));
|
|
|
|
|
set_row(4,"@82gKe @S", FLD(LF_SOGGETTI,SOG_KELL));
|
|
|
|
|
set_row(5,"@82gDu @S", FLD(LF_SOGGETTI,SOG_DU));
|
|
|
|
|
|
|
|
|
|
set_row(1,"@94g@S", FLD(LF_SOGGETTI,SOG_STATO));
|
|
|
|
|
set_row(2,"@94g@S", FLD(LF_SOGGETTI,SOG_IDON1));
|
|
|
|
|
set_row(3,"@94g@S", FLD(LF_SOGGETTI,SOG_IDON2));
|
|
|
|
|
set_row(4,"@94g@S", FLD(LF_SOGGETTI,SOG_IDON3));
|
|
|
|
|
set_row(5,"@94g@S", FLD(LF_SOGGETTI,SOG_IDON4));
|
|
|
|
|
|
|
|
|
|
set_row(1,"@98g@S", FLD(LF_SOGGETTI,SOG_DATAULTDON));
|
|
|
|
|
set_row(2,"@100g@n", FLD(LF_SOGGETTI,SOG_TOTDON));
|
|
|
|
|
set_row(3,"@98g@S", FLD(LF_SOGGETTI,SOG_DATAISC));
|
|
|
|
|
set_row(4,"@98g#a", &_benemerenza);
|
2000-10-10 08:00:26 +00:00
|
|
|
|
|
|
|
|
|
set_row(1,"@109g@pn", FLD(LF_SOGGETTI,SOG_INTSI,"###"));
|
|
|
|
|
set_row(2,"@109g@pn", FLD(LF_SOGGETTI,SOG_INTAF,"###"));
|
|
|
|
|
|
1997-12-05 16:26:15 +00:00
|
|
|
|
set_row(6,"");
|
|
|
|
|
}
|
1997-06-17 15:50:08 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
1997-08-01 14:49:53 +00:00
|
|
|
|
bool TStampaPerCategorie::filter_func_percat(const TRelation* rel)
|
1997-06-17 15:50:08 +00:00
|
|
|
|
{
|
|
|
|
|
bool filtrato = FALSE;
|
|
|
|
|
TLocalisamfile& sog = rel->lfile();
|
1997-08-01 14:49:53 +00:00
|
|
|
|
// filtro per categorie donatori
|
1997-06-17 15:50:08 +00:00
|
|
|
|
TAssoc_array& categorie = app()._catdon;
|
|
|
|
|
if (categorie.items() != 0)
|
|
|
|
|
{
|
2000-03-03 11:47:59 +00:00
|
|
|
|
const TString& cat = sog.get(SOG_CATDON);
|
|
|
|
|
filtrato = categorie.is_key(cat);
|
1997-06-17 15:50:08 +00:00
|
|
|
|
}
|
|
|
|
|
if (!filtrato)
|
|
|
|
|
{
|
|
|
|
|
// filtro per categorie non donatori
|
|
|
|
|
TAssoc_array& categorie = app()._catnondon;
|
|
|
|
|
if (categorie.items() != 0)
|
|
|
|
|
{
|
|
|
|
|
const TString16 cat1 = sog.get(SOG_CATNOND1);
|
|
|
|
|
const TString16 cat2 = sog.get(SOG_CATNOND2);
|
|
|
|
|
filtrato = (categorie.is_key((const char*) cat1) || categorie.is_key((const char*) cat2)) ;
|
|
|
|
|
}
|
|
|
|
|
}
|
1997-08-01 14:49:53 +00:00
|
|
|
|
// se non ho selezionato categorie il soggetto va filtrato comunque
|
1997-06-17 15:50:08 +00:00
|
|
|
|
if (app()._catdon.items() == 0 && app()._catnondon.items() == 0)
|
|
|
|
|
filtrato = TRUE;
|
1997-08-01 14:49:53 +00:00
|
|
|
|
// filtro per iniziale cognome
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if (filtrato && ((!app()._lettini.blank()) || (!app()._lettfin.blank())))
|
1997-08-01 14:49:53 +00:00
|
|
|
|
{
|
|
|
|
|
TString80 cognome = sog.get(SOG_COGNOME);
|
1998-05-25 13:20:15 +00:00
|
|
|
|
int leni = app()._lettini.len();
|
|
|
|
|
TString16 cognomei = cognome.left(leni);
|
|
|
|
|
int lenf = app()._lettfin.len();
|
|
|
|
|
TString16 cognomef = cognome.left(lenf);
|
|
|
|
|
if (!(cognomei >= app()._lettini && cognomef <= app()._lettfin))
|
1997-08-01 14:49:53 +00:00
|
|
|
|
filtrato = FALSE;
|
|
|
|
|
}
|
1997-06-17 15:50:08 +00:00
|
|
|
|
return filtrato;
|
|
|
|
|
}
|
|
|
|
|
|
1997-08-01 14:49:53 +00:00
|
|
|
|
void TStampaPerCategorie::header_sezione(const TString16 codsez, const TString16 codsot)
|
1997-06-17 15:50:08 +00:00
|
|
|
|
{
|
|
|
|
|
const TString80 densez = current_cursor()->curr(LF_SEZIONI).get(SEZ_DENSEZ);
|
|
|
|
|
const TString80 densot = current_cursor()->curr(LF_SEZIONI).get(SEZ_DENSOT);
|
|
|
|
|
TString intestazione(132);
|
|
|
|
|
intestazione = "Sezione: ";
|
|
|
|
|
intestazione << codsez;
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if (!codsot.blank())
|
|
|
|
|
{
|
|
|
|
|
intestazione << '/';
|
|
|
|
|
intestazione << codsot;
|
|
|
|
|
}
|
1998-05-11 09:46:37 +00:00
|
|
|
|
intestazione << ' ';
|
1997-06-17 15:50:08 +00:00
|
|
|
|
intestazione << densez;
|
2000-05-03 10:04:40 +00:00
|
|
|
|
if (!densot.blank() && !codsot.blank())
|
1997-06-17 15:50:08 +00:00
|
|
|
|
{
|
1998-05-11 09:46:37 +00:00
|
|
|
|
intestazione << '/';
|
1997-06-17 15:50:08 +00:00
|
|
|
|
intestazione << densot;
|
|
|
|
|
}
|
1997-12-05 16:26:15 +00:00
|
|
|
|
if (_stampa80)
|
|
|
|
|
intestazione.center_just(80);
|
|
|
|
|
else
|
|
|
|
|
intestazione.center_just(132);
|
1997-06-17 15:50:08 +00:00
|
|
|
|
set_header(1,"@0g%s", (const char*) intestazione);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2009-12-30 15:45:28 +00:00
|
|
|
|
bool TStampaPerCategorie::filepers_put(const char* nomecampo, const char* valore)
|
|
|
|
|
{
|
|
|
|
|
TRectype& curr_rec = _filepers->curr();
|
|
|
|
|
if (!curr_rec.exist(nomecampo))
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
curr_rec.put(nomecampo, valore);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
1997-08-01 14:49:53 +00:00
|
|
|
|
bool TStampaPerCategorie::preprocess_page(int file, int counter)
|
1997-06-17 15:50:08 +00:00
|
|
|
|
{
|
1998-02-23 08:30:28 +00:00
|
|
|
|
TRectype& recsog = current_cursor()->curr();
|
1997-12-05 16:26:15 +00:00
|
|
|
|
if (_tipostampa==sintetico||_tipostampa==completo)
|
1997-06-17 15:50:08 +00:00
|
|
|
|
{
|
|
|
|
|
TString80 nome = recsog.get(SOG_COGNOME);
|
1998-05-11 09:46:37 +00:00
|
|
|
|
nome << ' ';
|
1997-06-17 15:50:08 +00:00
|
|
|
|
nome << recsog.get(SOG_NOME);
|
|
|
|
|
_cognome_nome = nome;
|
|
|
|
|
TString256 localita = "";
|
1999-01-26 14:18:25 +00:00
|
|
|
|
localita << recsog.get(SOG_DOM_CAP);
|
|
|
|
|
localita << " ";
|
|
|
|
|
if (!recsog.get(SOG_DOM_CODLOC).blank())
|
1997-12-05 16:26:15 +00:00
|
|
|
|
localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S0");
|
1997-06-17 15:50:08 +00:00
|
|
|
|
else
|
1999-01-26 14:18:25 +00:00
|
|
|
|
localita << current_cursor()->curr(LF_COMUNI).get(COM_DENCOM);
|
1998-05-11 09:46:37 +00:00
|
|
|
|
localita << ' ' << current_cursor()->curr(LF_COMUNI).get(COM_PROVCOM);
|
1997-06-17 15:50:08 +00:00
|
|
|
|
localita.trim();
|
|
|
|
|
_dencom = localita;
|
1997-12-05 16:26:15 +00:00
|
|
|
|
// cerco ultima benemerenza
|
|
|
|
|
TString80 benemerenza = "";
|
|
|
|
|
const long codice = recsog.get_long(SOG_CODICE);
|
2009-12-30 15:45:28 +00:00
|
|
|
|
|
1998-08-07 09:55:37 +00:00
|
|
|
|
TRectype key = TRectype(LF_BENEM);
|
2009-12-30 15:45:28 +00:00
|
|
|
|
|
1998-08-07 09:55:37 +00:00
|
|
|
|
key.put(BEN_CODICE,codice);
|
1997-12-05 16:26:15 +00:00
|
|
|
|
const int err = _sbenemerenze->read(key);
|
|
|
|
|
if (err == NOERR)
|
|
|
|
|
{
|
|
|
|
|
const int ultima = _sbenemerenze->rows();
|
|
|
|
|
if (ultima != 0)
|
|
|
|
|
{
|
2009-12-30 15:45:28 +00:00
|
|
|
|
//sorting delle benemerenze (necessario in quanto alcuni stupidissimi volontari sono riusciti a mettere le benemerenze..
|
|
|
|
|
//..in ordine sparso!!!
|
|
|
|
|
_sbenemerenze->sort(compare_benem);
|
|
|
|
|
|
2002-10-24 09:07:43 +00:00
|
|
|
|
const TString16 codben = _sbenemerenze->row(ultima).get(BEN_TIPOBEN);
|
|
|
|
|
benemerenza << cache().get("BNZ", codben).get("S0");
|
1997-12-05 16:26:15 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
benemerenza.cut(21);
|
|
|
|
|
_benemerenza = benemerenza;
|
1998-02-23 08:30:28 +00:00
|
|
|
|
}
|
|
|
|
|
// salto pagina se cambio sezione o gruppo aziendale
|
|
|
|
|
if (_tipostampa==sintetico || _tipostampa==completo || _tipostampa==personale)
|
|
|
|
|
{
|
1997-12-05 16:26:15 +00:00
|
|
|
|
if (_pergruppo)
|
1997-06-17 15:50:08 +00:00
|
|
|
|
{
|
1997-12-05 16:26:15 +00:00
|
|
|
|
TString16 grupponew = current_cursor()->curr(LF_SOGGETTI).get(SOG_GRUPPOAZIE);
|
|
|
|
|
if (grupponew != _gruppoold )
|
|
|
|
|
{
|
|
|
|
|
if (_gruppoold != "**")
|
|
|
|
|
footer_gruppo();
|
|
|
|
|
_contatore = 0;
|
|
|
|
|
_gruppoold = grupponew;
|
|
|
|
|
header_gruppo(grupponew);
|
|
|
|
|
}
|
1997-06-17 15:50:08 +00:00
|
|
|
|
}
|
1997-12-05 16:26:15 +00:00
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
const TString16 codsez = recsog.get(SOG_CODSEZ);
|
|
|
|
|
const TString16 codsot = recsog.get(SOG_CODSOT);
|
2000-05-03 10:04:40 +00:00
|
|
|
|
if ((_codsez!=codsez)||((_codsot!=codsot) && (!_nosottogruppo)))
|
1997-12-05 16:26:15 +00:00
|
|
|
|
{
|
|
|
|
|
if (_codsez != "**")
|
|
|
|
|
footer_sezione();
|
|
|
|
|
_contatore = 0;
|
|
|
|
|
_codsez = codsez;
|
|
|
|
|
_codsot = codsot;
|
2000-05-03 10:04:40 +00:00
|
|
|
|
if (_nosottogruppo)
|
|
|
|
|
header_sezione(codsez, " ");
|
|
|
|
|
else
|
|
|
|
|
header_sezione(codsez, codsot);
|
1997-12-05 16:26:15 +00:00
|
|
|
|
}
|
1998-02-23 08:30:28 +00:00
|
|
|
|
}
|
1998-10-16 14:18:01 +00:00
|
|
|
|
if (((_tipostampa==sintetico) && ((_stampa80 && printer().rows_left()<4) || (printer().rows_left()<3))) || (printer().rows_left()<6 && _tipostampa==completo))
|
|
|
|
|
printer().formfeed();
|
1998-02-23 08:30:28 +00:00
|
|
|
|
}
|
2009-12-30 15:45:28 +00:00
|
|
|
|
if (_tipostampa==etichette && _etrighe == 0)
|
1997-12-05 16:26:15 +00:00
|
|
|
|
if (printer().rows_left() < _form_eti->get_body().height())
|
|
|
|
|
printer().formfeed();
|
2008-03-19 14:55:37 +00:00
|
|
|
|
if (_tipostampa==notiziario && _etrighe == 0)
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if (printer().rows_left() < _form_neti->get_body().height())
|
|
|
|
|
printer().formfeed();
|
1998-08-12 11:00:26 +00:00
|
|
|
|
if (_perfamiglie)
|
|
|
|
|
{
|
|
|
|
|
TRectype& recfam = current_cursor()->curr(LF_FAMIGLIE);
|
|
|
|
|
const long codice = recsog.get_long(SOG_CODICE);
|
|
|
|
|
const long codsufam = recfam.get_long(FAM_CODFAM);
|
|
|
|
|
const int rigafamsog = recfam.get_int(FAM_PROGFAM);
|
|
|
|
|
if ( codsufam == codice)
|
|
|
|
|
{
|
|
|
|
|
TRectype key = TRectype(LF_FAMIGLIE);
|
|
|
|
|
key.put(FAM_FAMIGLIA, recfam.get_long(FAM_FAMIGLIA));
|
|
|
|
|
const int err = _sfamiglia->read(key);
|
|
|
|
|
if (err == NOERR)
|
|
|
|
|
{
|
1998-09-25 13:05:55 +00:00
|
|
|
|
TRecnotype pos = current_cursor()->pos();
|
1998-08-12 11:00:26 +00:00
|
|
|
|
// controllo se qualcuno che lo precede nella famiglia rientra
|
|
|
|
|
// nella selezione, in questo caso ho gia' stampato la famiglia
|
|
|
|
|
// che viene stampata quando incontro il primo componente che
|
|
|
|
|
// rientra nella famiglia
|
|
|
|
|
// se non l'ho ancora stampato, accodo tutti i nominativi
|
|
|
|
|
// della famiglia e stampo
|
|
|
|
|
bool dastampare=TRUE;
|
|
|
|
|
for (int r=1; r<=_sfamiglia->rows(); r++)
|
|
|
|
|
{
|
|
|
|
|
const TRectype& riga = _sfamiglia->row(r);
|
|
|
|
|
long codfam = riga.get_long(FAM_CODFAM);
|
|
|
|
|
if (!(codice == codfam))
|
|
|
|
|
{
|
|
|
|
|
TLocalisamfile sog(LF_SOGGETTI);
|
|
|
|
|
sog.setkey(1);
|
|
|
|
|
sog.put(SOG_CODICE, codfam);
|
|
|
|
|
if (sog.read() == NOERR)
|
|
|
|
|
{
|
|
|
|
|
current_cursor()->curr().put(SOG_CODSEZ, sog.get(SOG_CODSEZ));
|
|
|
|
|
current_cursor()->curr().put(SOG_CODSOT, sog.get(SOG_CODSOT));
|
|
|
|
|
current_cursor()->curr().put(SOG_COGNOME, sog.get(SOG_COGNOME));
|
|
|
|
|
current_cursor()->curr().put(SOG_NOME, sog.get(SOG_NOME));
|
|
|
|
|
current_cursor()->curr().put(SOG_DATANASC, sog.get(SOG_DATANASC));
|
|
|
|
|
if (current_cursor()->test() == NOERR)
|
|
|
|
|
if (r < rigafamsog)
|
|
|
|
|
dastampare = FALSE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//current_cursor()->restore_status();
|
|
|
|
|
if (dastampare)
|
|
|
|
|
{
|
|
|
|
|
TString256 cognome = "";
|
|
|
|
|
for (int r=1; r<=_sfamiglia->rows(); r++)
|
|
|
|
|
{
|
|
|
|
|
const TRectype& riga = _sfamiglia->row(r);
|
|
|
|
|
long codfam = riga.get_long(FAM_CODFAM);
|
|
|
|
|
if (codice == codfam)
|
|
|
|
|
{
|
|
|
|
|
TLocalisamfile sog(LF_SOGGETTI);
|
|
|
|
|
sog.setkey(1);
|
|
|
|
|
sog.put(SOG_CODICE, codfam);
|
|
|
|
|
if (sog.read() == NOERR)
|
|
|
|
|
{
|
|
|
|
|
cognome << sog.get(SOG_COGNOME);
|
|
|
|
|
cognome << " ";
|
|
|
|
|
cognome << sog.get(SOG_NOME);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
TLocalisamfile sog(LF_SOGGETTI);
|
|
|
|
|
sog.setkey(1);
|
|
|
|
|
sog.put(SOG_CODICE, codfam);
|
|
|
|
|
if (sog.read() == NOERR)
|
|
|
|
|
{
|
|
|
|
|
current_cursor()->curr().put(SOG_CODSEZ, sog.get(SOG_CODSEZ));
|
|
|
|
|
current_cursor()->curr().put(SOG_CODSOT, sog.get(SOG_CODSOT));
|
|
|
|
|
current_cursor()->curr().put(SOG_COGNOME, sog.get(SOG_COGNOME));
|
|
|
|
|
current_cursor()->curr().put(SOG_NOME, sog.get(SOG_NOME));
|
|
|
|
|
current_cursor()->curr().put(SOG_DATANASC, sog.get(SOG_DATANASC));
|
|
|
|
|
if (current_cursor()->test() == NOERR)
|
|
|
|
|
{
|
|
|
|
|
//TLocalisamfile soggetti(LF_SOGGETTI);
|
|
|
|
|
//soggetti.setkey(1);
|
|
|
|
|
//soggetti.put(SOG_CODICE, codfam);
|
|
|
|
|
sog.put(SOG_CODICE, codfam);
|
|
|
|
|
if (sog.read() == NOERR)
|
|
|
|
|
{
|
|
|
|
|
cognome << ", ";
|
|
|
|
|
cognome << sog.get(SOG_COGNOME);
|
|
|
|
|
cognome << " ";
|
|
|
|
|
cognome << sog.get(SOG_NOME);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
_cognome_nome = cognome;
|
|
|
|
|
}
|
1998-09-25 13:05:55 +00:00
|
|
|
|
}
|
|
|
|
|
(*current_cursor()) = pos;
|
1998-08-12 11:00:26 +00:00
|
|
|
|
if (!dastampare)
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
TString80 cognome= "";
|
|
|
|
|
cognome << recsog.get(SOG_COGNOME);
|
|
|
|
|
cognome << " ";
|
|
|
|
|
cognome << recsog.get(SOG_NOME);
|
|
|
|
|
_cognome_nome = cognome;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
TString80 cognome= "";
|
|
|
|
|
cognome << recsog.get(SOG_COGNOME);
|
|
|
|
|
cognome << " ";
|
|
|
|
|
cognome << recsog.get(SOG_NOME);
|
|
|
|
|
_cognome_nome = cognome;
|
|
|
|
|
}
|
2000-03-03 11:47:59 +00:00
|
|
|
|
if (_tipostampa==stampasufile)
|
|
|
|
|
{
|
|
|
|
|
_file->zero();
|
2005-05-17 11:20:53 +00:00
|
|
|
|
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));
|
|
|
|
|
}
|
2009-12-30 15:45:28 +00:00
|
|
|
|
_file->put("DATANASC", recsog.get_date(SOG_DATANASC));
|
2000-03-03 11:47:59 +00:00
|
|
|
|
_file->put("SPOSATA",recsog.get(SOG_COGNOME_SP));
|
|
|
|
|
_file->put("INDIRIZZO",recsog.get(SOG_DOM_INDIR));
|
|
|
|
|
_file->put("PRESSO",recsog.get(SOG_DOM_DISTRI));
|
2003-06-23 10:28:05 +00:00
|
|
|
|
_file->put("STRADARIO",recsog.get(SOG_DOM_STRADA));
|
2000-03-03 11:47:59 +00:00
|
|
|
|
TString80 localita = "";
|
|
|
|
|
localita << recsog.get(SOG_DOM_CAP);
|
|
|
|
|
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();
|
|
|
|
|
_file->put("LOCALITA",localita);
|
|
|
|
|
_file->write();
|
|
|
|
|
do_events();
|
|
|
|
|
}
|
2005-05-17 11:20:53 +00:00
|
|
|
|
if (_tipostampa==filepers)
|
|
|
|
|
{
|
|
|
|
|
_filepers->zero();
|
2009-12-30 15:45:28 +00:00
|
|
|
|
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));
|
|
|
|
|
const char* sesso = recsog.get(SOG_SESSO)[0] =='1' ? "M" : "F";
|
|
|
|
|
filepers_put("SESSO", sesso);
|
|
|
|
|
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));
|
2005-05-17 11:20:53 +00:00
|
|
|
|
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();
|
2009-12-30 15:45:28 +00:00
|
|
|
|
filepers_put("LOCALITA",localita);
|
2005-05-17 11:20:53 +00:00
|
|
|
|
_filepers->write();
|
|
|
|
|
do_events();
|
|
|
|
|
}
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if (_tipostampa!=etichette && _tipostampa!=notiziario)
|
|
|
|
|
_contatore++;
|
1997-06-17 15:50:08 +00:00
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
1997-08-01 14:49:53 +00:00
|
|
|
|
bool TStampaPerCategorie::set_print(int m)
|
1997-06-17 15:50:08 +00:00
|
|
|
|
{
|
1999-01-26 14:18:25 +00:00
|
|
|
|
TPrinter& p = printer();
|
|
|
|
|
p.read_configuration();
|
1997-12-05 16:26:15 +00:00
|
|
|
|
_tipostampa = undefined;
|
1997-06-17 15:50:08 +00:00
|
|
|
|
KEY tasto;
|
|
|
|
|
tasto = _msk->run();
|
|
|
|
|
switch (tasto)
|
|
|
|
|
{
|
1997-12-05 16:26:15 +00:00
|
|
|
|
case F_SINTETICO:
|
|
|
|
|
_tipostampa=sintetico;
|
|
|
|
|
break;
|
|
|
|
|
case F_COMPLETO:
|
|
|
|
|
_tipostampa=completo;
|
|
|
|
|
break;
|
1998-02-23 08:30:28 +00:00
|
|
|
|
case F_PERSONALE:
|
|
|
|
|
_tipostampa=personale;
|
|
|
|
|
break;
|
1997-12-05 16:26:15 +00:00
|
|
|
|
case F_SCHEDE:
|
|
|
|
|
_tipostampa=schede;
|
1998-02-16 13:45:58 +00:00
|
|
|
|
if (_schxpag > 1)
|
|
|
|
|
printer().formlen(_lenpage/_schxpag);
|
1997-12-05 16:26:15 +00:00
|
|
|
|
break;
|
|
|
|
|
case F_ETICHETTE:
|
1999-01-26 14:18:25 +00:00
|
|
|
|
{
|
|
|
|
|
if (_msk->get_bool(F_NOTIZIARIO))
|
|
|
|
|
_tipostampa = (configura_stampante(p, "AT_NOTIZIARIO", "et. notiziario")) ? notiziario : undefined;
|
|
|
|
|
else
|
|
|
|
|
_tipostampa = (configura_stampante(p, "AT_ETICHETTE", "etichette")) ? etichette : undefined;
|
|
|
|
|
}
|
1997-12-05 16:26:15 +00:00
|
|
|
|
break;
|
|
|
|
|
case F_CARTOLINE:
|
2004-04-21 08:14:21 +00:00
|
|
|
|
_tipostampa = (configura_stampante(p, "AT_CARTOLINE", "cartoline")) ? dati_cartolina() : undefined;
|
1997-12-05 16:26:15 +00:00
|
|
|
|
break;
|
2000-03-03 11:47:59 +00:00
|
|
|
|
case F_FILE:
|
|
|
|
|
{
|
|
|
|
|
_tipostampa=stampasufile;
|
|
|
|
|
//operazione aggiunta da Marco il 04/11/99 per svuotare il contenuto del file prima di riempirlo nuovamente
|
2000-10-10 08:00:26 +00:00
|
|
|
|
if (yesno_box("Azzerare il contenuto del file prima dell'elaborazione?"))
|
|
|
|
|
_file->zap();
|
2000-03-03 11:47:59 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
2005-05-17 11:20:53 +00:00
|
|
|
|
case F_FILEPERS:
|
2005-06-21 12:37:40 +00:00
|
|
|
|
{
|
|
|
|
|
if (_filepers == NULL)
|
|
|
|
|
message_box("Manca il file di destinazione: opzione non selezionabile");
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_tipostampa=filepers;
|
|
|
|
|
if (yesno_box("Azzerare il contenuto del file prima dell'elaborazione?"))
|
|
|
|
|
_filepers->zap();
|
|
|
|
|
}
|
2005-05-17 11:20:53 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
1997-06-17 15:50:08 +00:00
|
|
|
|
}
|
1997-12-05 16:26:15 +00:00
|
|
|
|
if (_tipostampa != undefined)
|
1997-06-17 15:50:08 +00:00
|
|
|
|
{
|
1997-12-05 16:26:15 +00:00
|
|
|
|
if (_tipostampa == cartoline)
|
|
|
|
|
dati_cartolina();
|
2005-05-17 11:20:53 +00:00
|
|
|
|
if (_tipostampa==etichette || _tipostampa==notiziario || _tipostampa==stampasufile)
|
1998-08-12 11:00:26 +00:00
|
|
|
|
_cognome_nome.set_width(200);
|
1997-12-05 16:26:15 +00:00
|
|
|
|
_codsez = "**";
|
|
|
|
|
_codsot = "**";
|
|
|
|
|
_gruppoold = "**";
|
|
|
|
|
_contatore = 0;
|
2003-12-03 09:31:34 +00:00
|
|
|
|
_netichette = 0;
|
2004-04-21 08:14:21 +00:00
|
|
|
|
_ncartoline = 0;
|
2003-12-03 09:31:34 +00:00
|
|
|
|
TString256 chiave = "";
|
1997-12-05 16:26:15 +00:00
|
|
|
|
_pergruppo = _msk->get_bool(F_PERGRUPPO);
|
1998-08-12 11:00:26 +00:00
|
|
|
|
_perfamiglie = _msk->get_bool(F_PERFAMIGLIE);
|
2000-05-03 10:04:40 +00:00
|
|
|
|
_nosottogruppo = _msk->get_bool(F_NOSOTTOGRUPPO);
|
1997-06-17 15:50:08 +00:00
|
|
|
|
bool percap = _msk->get_bool(F_PERCAP);
|
1997-12-05 16:26:15 +00:00
|
|
|
|
_capini = _msk->get(F_CAPINI);
|
|
|
|
|
_capfin = _msk->get(F_CAPFIN);
|
|
|
|
|
_lettini = _msk->get(F_LETTINI);
|
|
|
|
|
_lettini.left(15);
|
|
|
|
|
_lettfin = _msk->get(F_LETTFIN);
|
|
|
|
|
_lettfin.left(15);
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if (_lettfin.blank())
|
|
|
|
|
_lettfin = "ZZZZZZZZZZZZZZZ";
|
1998-02-23 08:30:28 +00:00
|
|
|
|
if (_pergruppo)
|
|
|
|
|
{
|
|
|
|
|
_gruppoazie = _msk->get(F_GRUPPOAZIE);
|
|
|
|
|
if (_gruppoazie.empty())
|
|
|
|
|
chiave << "90->GRUPPOAZIE|";
|
|
|
|
|
}
|
1997-06-17 15:50:08 +00:00
|
|
|
|
if (percap)
|
1997-12-05 16:26:15 +00:00
|
|
|
|
chiave << "90->DOM_CAP|90->DOM_CODCOM|90->DOM_CODLOC|UPPER(90->COGNOME)|UPPER(90->NOME)";
|
1997-06-17 15:50:08 +00:00
|
|
|
|
else
|
1998-02-23 08:30:28 +00:00
|
|
|
|
{
|
|
|
|
|
if (_pergruppo)
|
|
|
|
|
chiave << "UPPER(90->COGNOME)|UPPER(90->NOME)";
|
|
|
|
|
else
|
2000-05-03 10:04:40 +00:00
|
|
|
|
{
|
|
|
|
|
if (_nosottogruppo)
|
|
|
|
|
chiave << "90->CODSEZ|UPPER(90->COGNOME)|UPPER(90->NOME)";
|
|
|
|
|
else
|
|
|
|
|
chiave << "90->CODSEZ|90->CODSOT|UPPER(90->COGNOME)|UPPER(90->NOME)";
|
|
|
|
|
}
|
1998-02-23 08:30:28 +00:00
|
|
|
|
}
|
1997-12-05 16:26:15 +00:00
|
|
|
|
TString256 filtro = "";
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if (_pergruppo)
|
|
|
|
|
{
|
|
|
|
|
if (_gruppoazie.not_empty())
|
|
|
|
|
filtro.format("(90->GRUPPOAZIE == \"%s\")",(const char*)_gruppoazie);
|
|
|
|
|
else
|
|
|
|
|
filtro.format("(90->GRUPPOAZIE != \"\")");
|
|
|
|
|
}
|
1997-12-05 16:26:15 +00:00
|
|
|
|
if (_capini.not_empty())
|
|
|
|
|
{
|
|
|
|
|
if (filtro.not_empty())
|
|
|
|
|
filtro << " && ";
|
|
|
|
|
filtro << format("(90->DOM_CAP >= \"%s\")",(const char*)_capini);
|
|
|
|
|
}
|
|
|
|
|
if (_capfin.not_empty())
|
|
|
|
|
{
|
|
|
|
|
if (filtro.not_empty())
|
|
|
|
|
filtro << " && ";
|
|
|
|
|
filtro << format("(90->DOM_CAP <= \"%s\")",(const char*)_capfin);
|
|
|
|
|
}
|
2000-03-03 11:47:59 +00:00
|
|
|
|
if ((_tipostampa==notiziario) || _msk->get_bool(F_NOTIZIARIO))
|
1997-12-05 16:26:15 +00:00
|
|
|
|
{
|
|
|
|
|
if (filtro.not_empty())
|
|
|
|
|
filtro << " && ";
|
|
|
|
|
filtro << "(90->NOTIZIARIO == \"X\")";
|
|
|
|
|
}
|
|
|
|
|
const TString16 sezini = _msk->get(F_SEZINI);
|
|
|
|
|
const TString16 sotini = _msk->get(F_SOTINI);
|
|
|
|
|
const TString16 sezfin = _msk->get(F_SEZFIN);
|
|
|
|
|
const TString16 sotfin = _msk->get(F_SOTFIN);
|
|
|
|
|
TRectype da(LF_SOGGETTI);
|
|
|
|
|
TRectype a(LF_SOGGETTI);
|
|
|
|
|
if (sezini.not_empty())
|
|
|
|
|
da.put(SOG_CODSEZ, sezini);
|
|
|
|
|
if (sotini.not_empty())
|
|
|
|
|
da.put(SOG_CODSOT, sotini);
|
|
|
|
|
if (sezfin.not_empty())
|
|
|
|
|
a.put(SOG_CODSEZ, sezfin);
|
|
|
|
|
if (sotfin.not_empty())
|
|
|
|
|
a.put(SOG_CODSOT, sotfin);
|
|
|
|
|
current_cursor()->setregion(da, a);
|
2000-03-03 11:47:59 +00:00
|
|
|
|
current_cursor()->setfilter(filtro, FALSE);
|
1997-12-05 16:26:15 +00:00
|
|
|
|
((TSorted_cursor*)current_cursor())->change_order(chiave);
|
1997-06-17 15:50:08 +00:00
|
|
|
|
reset_files();
|
|
|
|
|
add_file(LF_SOGGETTI);
|
1998-02-04 13:46:27 +00:00
|
|
|
|
_catdon.destroy();
|
1997-06-17 15:50:08 +00:00
|
|
|
|
const TString16 catpri = _msk->get(F_CAT1);
|
|
|
|
|
const TString16 catsec = _msk->get(F_CAT2);
|
|
|
|
|
const TString16 catter = _msk->get(F_CAT3);
|
|
|
|
|
const TString16 catqua = _msk->get(F_CAT4);
|
|
|
|
|
const TString16 catqui = _msk->get(F_CAT5);
|
|
|
|
|
const TString16 catses = _msk->get(F_CAT6);
|
1999-01-26 14:18:25 +00:00
|
|
|
|
const TString16 catset = _msk->get(F_CAT7);
|
|
|
|
|
const TString16 catott = _msk->get(F_CAT8);
|
|
|
|
|
if (catpri.not_empty())
|
1997-06-17 15:50:08 +00:00
|
|
|
|
_catdon.add((const char*) catpri);
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if (catsec.not_empty())
|
1997-06-17 15:50:08 +00:00
|
|
|
|
_catdon.add((const char*) catsec);
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if (catter.not_empty())
|
1997-06-17 15:50:08 +00:00
|
|
|
|
_catdon.add((const char*) catter);
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if (catqua.not_empty())
|
1997-06-17 15:50:08 +00:00
|
|
|
|
_catdon.add((const char*) catqua);
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if (catqui.not_empty())
|
1997-06-17 15:50:08 +00:00
|
|
|
|
_catdon.add((const char*) catqui);
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if (catses.not_empty())
|
1997-06-17 15:50:08 +00:00
|
|
|
|
_catdon.add((const char*) catses);
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if (catset.not_empty())
|
|
|
|
|
_catdon.add((const char*) catset);
|
|
|
|
|
if (catott.not_empty())
|
|
|
|
|
_catdon.add((const char*) catott);
|
|
|
|
|
_catnondon.destroy();
|
1997-06-17 15:50:08 +00:00
|
|
|
|
const TString16 catnpri = _msk->get(F_CATN1);
|
|
|
|
|
const TString16 catnsec = _msk->get(F_CATN2);
|
|
|
|
|
const TString16 catnter = _msk->get(F_CATN3);
|
|
|
|
|
const TString16 catnqua = _msk->get(F_CATN4);
|
|
|
|
|
const TString16 catnqui = _msk->get(F_CATN5);
|
|
|
|
|
const TString16 catnses = _msk->get(F_CATN6);
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if (catnpri.not_empty())
|
1997-06-17 15:50:08 +00:00
|
|
|
|
_catnondon.add((const char*) catnpri);
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if (catnsec.not_empty())
|
1997-06-17 15:50:08 +00:00
|
|
|
|
_catnondon.add((const char*) catnsec);
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if (catnter.not_empty())
|
1997-06-17 15:50:08 +00:00
|
|
|
|
_catnondon.add((const char*) catnter);
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if (catnqua.not_empty())
|
1997-06-17 15:50:08 +00:00
|
|
|
|
_catnondon.add((const char*) catnqua);
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if (catnqui.not_empty())
|
1997-06-17 15:50:08 +00:00
|
|
|
|
_catnondon.add((const char*) catnqui);
|
1999-01-26 14:18:25 +00:00
|
|
|
|
if (catnses.not_empty())
|
1997-06-17 15:50:08 +00:00
|
|
|
|
_catnondon.add((const char*) catnses);
|
2000-03-03 11:47:59 +00:00
|
|
|
|
current_cursor()->set_filterfunction (filter_func_percat, FALSE);
|
2004-02-03 10:39:32 +00:00
|
|
|
|
if (_perfamiglie)
|
|
|
|
|
{
|
|
|
|
|
TConfig config(CONFIG_STUDIO);
|
|
|
|
|
TString16 etformato = config.get("EtFFormato");
|
|
|
|
|
_etlarghezza = config.get_int("EtFLarghezza");
|
|
|
|
|
_etcolonne = config.get_int("EtFColonne");
|
|
|
|
|
_etrighe = config.get_int("EtFRighe");
|
|
|
|
|
_etbordoini = config.get_int("EtFBordoIni");
|
|
|
|
|
_etbordofin = config.get_int("EtFBordoFin");
|
|
|
|
|
delete _form_eti;
|
|
|
|
|
_form_eti = new TEti_percat_form(etformato);
|
|
|
|
|
}
|
1997-06-17 15:50:08 +00:00
|
|
|
|
reset_print();
|
1998-09-02 14:06:20 +00:00
|
|
|
|
printer().footerlen(0);
|
1997-06-17 15:50:08 +00:00
|
|
|
|
crea_intestazione();
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
1997-08-01 14:49:53 +00:00
|
|
|
|
void TStampaPerCategorie::crea_intestazione()
|
1997-06-17 15:50:08 +00:00
|
|
|
|
{
|
|
|
|
|
reset_header();
|
1997-12-05 16:26:15 +00:00
|
|
|
|
TString sep(132);
|
|
|
|
|
if (_tipostampa==sintetico)
|
|
|
|
|
sep = "ELENCO SINTETICO PER CATEGORIE";
|
|
|
|
|
if (_tipostampa==completo)
|
|
|
|
|
sep = "ELENCO COMPLETO PER CATEGORIE";
|
|
|
|
|
if (_tipostampa==sintetico || _tipostampa==completo)
|
|
|
|
|
{
|
|
|
|
|
printer().footerlen(3);
|
|
|
|
|
|
|
|
|
|
if (_stampa80)
|
|
|
|
|
sep.center_just(80);
|
|
|
|
|
else
|
|
|
|
|
sep.center_just(132);
|
1997-06-17 15:50:08 +00:00
|
|
|
|
set_header(2, "@0g%s", (const char*) sep);
|
|
|
|
|
TString16 data_stampa = _data_stampa.string();
|
|
|
|
|
set_header(2,"@0g%10s", (const char*) data_stampa);
|
|
|
|
|
sep = "";
|
|
|
|
|
sep << "Pag. @#";
|
1997-12-05 16:26:15 +00:00
|
|
|
|
if (_stampa80)
|
|
|
|
|
set_header(2, "@73g%s", (const char*) sep);
|
|
|
|
|
else
|
|
|
|
|
set_header(2, "@110g%s", (const char*) sep);
|
1997-06-17 15:50:08 +00:00
|
|
|
|
sep = "";
|
|
|
|
|
sep.fill('-');
|
1998-05-25 13:20:15 +00:00
|
|
|
|
if (_stampa80)
|
|
|
|
|
sep.cut(80);
|
1997-06-17 15:50:08 +00:00
|
|
|
|
set_header(3, (const char *) sep);
|
1997-12-05 16:26:15 +00:00
|
|
|
|
}
|
1998-02-23 08:30:28 +00:00
|
|
|
|
if (_tipostampa==personale)
|
|
|
|
|
{
|
|
|
|
|
TPrint_section& testata = _form_per->get_head();
|
|
|
|
|
testata.update();
|
2009-12-30 15:45:28 +00:00
|
|
|
|
for (word i=0; i<testata.height(); i++)
|
1998-02-23 08:30:28 +00:00
|
|
|
|
{
|
|
|
|
|
TPrintrow& riga = testata.row(i);
|
|
|
|
|
TString256 riga1 = riga.row();
|
2009-12-30 15:45:28 +00:00
|
|
|
|
set_header(i+1,riga1);
|
1998-02-23 08:30:28 +00:00
|
|
|
|
}
|
|
|
|
|
TPrint_section& piede = _form_per->get_foot();
|
|
|
|
|
piede.update();
|
2009-12-30 15:45:28 +00:00
|
|
|
|
for (int i = 0; i < piede.height(); i++)
|
1998-02-23 08:30:28 +00:00
|
|
|
|
{
|
2009-12-30 15:45:28 +00:00
|
|
|
|
TPrintrow& riga = piede.row(i);
|
1998-02-23 08:30:28 +00:00
|
|
|
|
TString256 riga1 = riga.row();
|
2009-12-30 15:45:28 +00:00
|
|
|
|
set_footer(i+1,riga1);
|
1998-02-23 08:30:28 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
1997-12-05 16:26:15 +00:00
|
|
|
|
if (_tipostampa==sintetico)
|
|
|
|
|
{
|
1998-05-25 13:20:15 +00:00
|
|
|
|
if (_stampa80)
|
|
|
|
|
{
|
|
|
|
|
_dencom.set_width(30);
|
|
|
|
|
set_header(4,"@0gCodice@9gCognome e nome@35gIndirizzo@67gTelefono abit.");
|
|
|
|
|
set_header(5,"@0gTessera@35gCAP/Localit<69>/Comune/Prov.@67gTelefono lavoro");
|
|
|
|
|
set_header(6,"@0gCat.don.@9gData nascita@67gTelefono altro");
|
|
|
|
|
set_header(7,"@0g--------@9g-------------------------@35g------------------------------@67g--------------");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_dencom.set_width(50);
|
|
|
|
|
set_header(4,"@0gCodice@9gC.@12gCognome e nome@38gNato il@49gIndirizzo@100gTelefono abit.@116gTelefono lavoro");
|
|
|
|
|
set_header(5,"@0gTessera@49gCAP/Localit<69>/Comune/Prov.@116gTelefono altro");
|
|
|
|
|
set_header(6,"@0g--------@9g--@12g-------------------------@38g----------@49g--------------------------------------------------@100g---------------@116g---------------");
|
|
|
|
|
}
|
1997-12-05 16:26:15 +00:00
|
|
|
|
}
|
|
|
|
|
if (_tipostampa==completo)
|
|
|
|
|
{
|
|
|
|
|
_dencom.set_width(30);
|
|
|
|
|
if (_stampa80)
|
|
|
|
|
{
|
|
|
|
|
set_header(4,"@0g Codice@9gCognome@40gTelefono abit.@56gTipizza@66gUlt.donaz.@77gSt.");
|
|
|
|
|
set_header(5,"@0g Tessera@9gNome@40gTelefono lavoro@56gzione@66gTot.donaz.@77gId.");
|
|
|
|
|
set_header(6,"@0g Categ.@9gData di nascita@40gTelefono altro@66gData iscr.");
|
|
|
|
|
set_header(7,"@9gIndirizzo@40gGruppo aziend.@66gUlt.benem.");
|
|
|
|
|
set_header(8,"@40gProfessione");
|
|
|
|
|
set_header(9,"@0g--------@9g------------------------------@40g---------------@56g---------@66g----------@77g---");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2000-10-10 08:00:26 +00:00
|
|
|
|
set_header(4,"@0g Codice@9gCognome@35gIndirizzo@66gTelefono abit.@82gTipizza@92gStato@98gUlt.donaz.@109gInt.SI");
|
|
|
|
|
set_header(5,"@0g Tessera@9gNome@66gTelefono lavoro@82gzione@92gIdon.@98gTot.donaz.@109gInt.AF");
|
1997-12-05 16:26:15 +00:00
|
|
|
|
set_header(6,"@0g Categ.@9gData di nascita@66gTelefono altro@98gData iscr.");
|
2000-10-10 08:00:26 +00:00
|
|
|
|
set_header(7,"@9gLuogo di nascita@66gGruppo aziend.@98gUlt.benem.");
|
1997-12-05 16:26:15 +00:00
|
|
|
|
set_header(8,"@66gProfessione");
|
2000-10-10 08:00:26 +00:00
|
|
|
|
set_header(9,"@0g--------@9g-------------------------@35g------------------------------@66g---------------@82g---------@92g-----@98g----------@109g------");
|
1997-12-05 16:26:15 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
1997-06-17 15:50:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
1997-08-01 14:49:53 +00:00
|
|
|
|
bool TStampaPerCategorie::user_create()
|
2010-01-05 14:03:30 +00:00
|
|
|
|
{
|
|
|
|
|
//controllo e caricamento dati dalla configurazione
|
|
|
|
|
TConfig config(CONFIG_STUDIO);
|
|
|
|
|
//etichette
|
|
|
|
|
TString16 etformato = config.get("EtFormato");
|
|
|
|
|
if (!controlla_esistenza_form(etformato, "ate10x36"))
|
|
|
|
|
return false;
|
|
|
|
|
_form_eti = new TEti_percat_form(etformato);
|
|
|
|
|
_etlarghezza = config.get_int("EtLarghezza");
|
|
|
|
|
_etcolonne = config.get_int("EtColonne");
|
|
|
|
|
_etrighe = config.get_int("EtRighe");
|
|
|
|
|
_etbordoini = config.get_int("EtBordoIni");
|
|
|
|
|
_etbordofin = config.get_int("EtBordoFin");
|
|
|
|
|
|
|
|
|
|
//etichette notiziario
|
|
|
|
|
TString16 etnformato = config.get("EtNFormato");
|
|
|
|
|
if (!controlla_esistenza_form(etnformato, "ate10x36"))
|
|
|
|
|
return false;
|
|
|
|
|
_form_neti = new TEti_percat_form(etnformato);
|
|
|
|
|
_stampa80 = config.get_bool("Stampa80");
|
|
|
|
|
_etictot = config.get_bool("EticTot");
|
|
|
|
|
|
|
|
|
|
//cartoline
|
|
|
|
|
TString16 caformato = config.get("CaFormato");
|
|
|
|
|
if (!controlla_esistenza_form(caformato, "atcarto1"))
|
|
|
|
|
return false;
|
|
|
|
|
_form_car = new TEti_percat_form(caformato);
|
|
|
|
|
|
|
|
|
|
//schede
|
|
|
|
|
TString16 schformato = config.get("SchFormato");
|
|
|
|
|
if (!controlla_esistenza_form(schformato, "at_pagin"))
|
|
|
|
|
return false;
|
|
|
|
|
_form_sch = new TEti_percat_form(schformato);
|
|
|
|
|
_schxpag = config.get_int("SchXPag");
|
|
|
|
|
|
|
|
|
|
//elenco
|
|
|
|
|
TString16 performato = config.get("ElencoFormato");
|
|
|
|
|
if (!controlla_esistenza_form(performato, "atrubrsa"))
|
|
|
|
|
return false;
|
|
|
|
|
_form_per = new TEti_percat_form(performato);
|
|
|
|
|
|
|
|
|
|
_lenpage = printer().formlen();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//attenzione: i files at2700a e at2700b, se si desiderano personalizzati, richiedono il tracciato record modificato..
|
|
|
|
|
//..in Custom; questo perch<63> le varie sezioni possono volere campi diversi; il max dei campi <20> quello che si trova..
|
|
|
|
|
//..nei trr ufficiali; la gestione dei campi mancanti <20> fatta dalla filepers_put() al momento della scrittura vera..
|
|
|
|
|
//..e propria dei files
|
|
|
|
|
//stampa indirizzi su file
|
|
|
|
|
TFilename filename, filetrr;
|
|
|
|
|
if (!controlla_esistenza_trr("at2700a", filename, filetrr))
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
_file = new TExternisamfile(filename, filetrr, false);
|
|
|
|
|
|
|
|
|
|
//stampa file personalizzato
|
|
|
|
|
TFilename persname, perstrr;
|
|
|
|
|
if (!controlla_esistenza_trr("at2700b", persname, perstrr))
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
_filepers = new TExternisamfile(persname, perstrr, false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//relazione e cursore
|
1997-06-17 15:50:08 +00:00
|
|
|
|
_rel = new TRelation(LF_SOGGETTI);
|
1997-12-05 16:26:15 +00:00
|
|
|
|
_rel->add(LF_DONAZ, "CODICE==CODICE", 1);
|
|
|
|
|
_rel->add(LF_BENEM, "CODICE==CODICE", 1);
|
1998-08-12 11:00:26 +00:00
|
|
|
|
_rel->add(LF_FAMIGLIE, "CODFAM==CODICE", 2);
|
1997-06-17 15:50:08 +00:00
|
|
|
|
_rel->add(LF_SEZIONI, "CODSEZ==CODSEZ|CODSOT==CODSOT");
|
1997-12-05 16:26:15 +00:00
|
|
|
|
_rel->add("BNZ", "CODTAB==TIPOBEN", 1, LF_BENEM, ALIAS_BNZ);
|
|
|
|
|
_rel->add("CTD", "CODTAB==CATDON",1,0,ALIAS_CTD);
|
|
|
|
|
_rel->add("CTN", "CODTAB==CATNOND1",1,0,ALIAS_CTN1);
|
|
|
|
|
_rel->add("CTN", "CODTAB==CATNOND2",1,0,ALIAS_CTN2);
|
|
|
|
|
_rel->add("TCS", "CODTAB==STATO",1,0,ALIAS_TCS);
|
|
|
|
|
_rel->add("LDN", "CODTAB==PUNTORACC",1,0,ALIAS_LDN);
|
1998-07-03 13:16:30 +00:00
|
|
|
|
_rel->add("LDN", "CODTAB==LUOGODON",1,LF_DONAZ, ALIAS_LDNDON);
|
1997-12-05 16:26:15 +00:00
|
|
|
|
_rel->add("LCP", "CODTAB==DOM_CODLOC",1,0,ALIAS_LCPDOM);
|
|
|
|
|
_rel->add("GAZ", "CODTAB==GRUPPOAZIE",1,0,ALIAS_GAZ);
|
|
|
|
|
_rel->add(LF_COMUNI, "COM==DOM_CODCOM",1,0,ALIAS_COMDOM);
|
|
|
|
|
_rel->add(LF_COMUNI, "COM==COMNASC",1,0,ALIAS_COMNAS);
|
|
|
|
|
_rel->add(LF_MEDICI, "CODMED==CODMED");
|
|
|
|
|
_donaz = new TLocalisamfile(LF_DONAZ);
|
|
|
|
|
_benem = new TLocalisamfile(LF_BENEM);
|
1998-08-12 11:00:26 +00:00
|
|
|
|
_famiglie = new TLocalisamfile(LF_FAMIGLIE);
|
1997-12-05 16:26:15 +00:00
|
|
|
|
_sbenemerenze = new TRecord_array(LF_BENEM,BEN_PROGBEN);
|
1998-08-12 11:00:26 +00:00
|
|
|
|
_sfamiglia = new TRecord_array(LF_FAMIGLIE,FAM_PROGFAM);
|
1998-02-23 08:30:28 +00:00
|
|
|
|
add_cursor(new TSorted_cursor(_rel,"SOG_CODSEZ|SOG_CODSOT","",3));
|
2003-12-03 09:31:34 +00:00
|
|
|
|
|
2010-01-05 14:03:30 +00:00
|
|
|
|
//maschera
|
|
|
|
|
_msk = new TMask("at2700a");
|
2010-01-05 09:46:29 +00:00
|
|
|
|
|
|
|
|
|
return true;
|
1997-06-17 15:50:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
1997-08-01 14:49:53 +00:00
|
|
|
|
bool TStampaPerCategorie::user_destroy()
|
1997-06-17 15:50:08 +00:00
|
|
|
|
{
|
1998-08-07 09:55:37 +00:00
|
|
|
|
delete _form_per;
|
|
|
|
|
delete _form_sch;
|
|
|
|
|
delete _form_car;
|
|
|
|
|
delete _form_eti;
|
1997-06-17 15:50:08 +00:00
|
|
|
|
delete _msk;
|
2005-06-21 12:37:40 +00:00
|
|
|
|
if (_filepers != NULL)
|
|
|
|
|
delete _filepers;
|
2006-04-13 17:56:02 +00:00
|
|
|
|
delete _file;
|
1998-08-12 11:00:26 +00:00
|
|
|
|
delete _sfamiglia;
|
1998-08-07 09:55:37 +00:00
|
|
|
|
delete _sbenemerenze;
|
1998-08-12 11:00:26 +00:00
|
|
|
|
delete _famiglie;
|
1997-12-05 16:26:15 +00:00
|
|
|
|
delete _benem;
|
|
|
|
|
delete _donaz;
|
1998-08-07 09:55:37 +00:00
|
|
|
|
delete _rel;
|
1997-06-17 15:50:08 +00:00
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int at2700(int argc, char* argv[])
|
|
|
|
|
{
|
1997-08-01 14:49:53 +00:00
|
|
|
|
TStampaPerCategorie a;
|
1998-08-07 09:55:37 +00:00
|
|
|
|
a.run(argc, argv, "Soggetti per categorie");
|
1997-06-17 15:50:08 +00:00
|
|
|
|
return 0;
|
|
|
|
|
}
|