Corretto errore MI2112
git-svn-id: svn://10.65.10.50/trunk@717 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7876c36981
commit
6fd947b4b0
@ -29,6 +29,7 @@ class BA3200_application : public TPrintapp
|
||||
TArray _string_roman;
|
||||
TArray _field_roman;
|
||||
bool _stampa_registri;
|
||||
bool _tabella_comune;
|
||||
|
||||
public:
|
||||
|
||||
@ -38,6 +39,7 @@ public:
|
||||
|
||||
virtual void set_page(int, int);
|
||||
virtual bool preprocess_page (int, int);
|
||||
virtual bool preprocess_print(int file, int counter);
|
||||
|
||||
void set_headers();
|
||||
void set_rows();
|
||||
@ -122,17 +124,7 @@ void BA3200_application::set_headers()
|
||||
TString NomeTabella, sep, formato_intesta, testo_intesta;
|
||||
int LungRiga, riga_intesta=0, last_riga=1;
|
||||
TToken_string line;
|
||||
TString80 ragsoc;
|
||||
TString256 riga;
|
||||
long codditta = get_firm();
|
||||
|
||||
TLocalisamfile nditte(LF_NDITTE);
|
||||
nditte.zero();
|
||||
nditte.put(NDT_CODDITTA, codditta);
|
||||
if (nditte.read() == NOERR)
|
||||
ragsoc = nditte.get(NDT_RAGSOC);
|
||||
else
|
||||
ragsoc = "";
|
||||
|
||||
reset_header ();
|
||||
|
||||
@ -145,14 +137,28 @@ void BA3200_application::set_headers()
|
||||
|
||||
riga.spaces(LungRiga);
|
||||
// Senno' nella stampa a 80 non ci sta ditta e data
|
||||
if (LungRiga < 100) ragsoc.cut(40);
|
||||
|
||||
// Leggo il nome della tabella
|
||||
line = rpt.line();
|
||||
NomeTabella = line.get();
|
||||
|
||||
// Sulla prima riga di intestazione metto la ditta, la data e la pagina
|
||||
riga.overwrite(format("Ditta %4ld %s", codditta,(const char *)ragsoc));
|
||||
if (!_tabella_comune)
|
||||
{
|
||||
const long codditta = get_firm();
|
||||
TString80 ragsoc;
|
||||
TLocalisamfile nditte(LF_NDITTE);
|
||||
|
||||
nditte.zero();
|
||||
nditte.put(NDT_CODDITTA, codditta);
|
||||
if (nditte.read() == NOERR)
|
||||
{
|
||||
ragsoc = nditte.get(NDT_RAGSOC);
|
||||
if (LungRiga < 100) ragsoc.cut(40);
|
||||
}
|
||||
riga.overwrite(format("Ditta %4ld %s", codditta,(const char *)ragsoc));
|
||||
}
|
||||
|
||||
riga.overwrite ("Data @< Pag. @#", riga.len()-22);
|
||||
|
||||
set_header (last_riga++, "%s", (const char *)riga);
|
||||
@ -330,7 +336,8 @@ bool BA3200_application::user_create()
|
||||
|
||||
TString16 t(_tabname);
|
||||
|
||||
if (t[0] == '%')
|
||||
_tabella_comune = (t[0] == '%');
|
||||
if (_tabella_comune)
|
||||
t.ltrim(1);
|
||||
|
||||
_rptname << "batb" << t << ".rpt" ;
|
||||
@ -365,11 +372,15 @@ bool BA3200_application::user_create()
|
||||
#ifdef DBG1
|
||||
set_fillchar ('.');
|
||||
#endif
|
||||
set_relations();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool BA3200_application::preprocess_print(int file, int counter)
|
||||
{
|
||||
set_headers();
|
||||
set_footers();
|
||||
set_translations();
|
||||
set_relations();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool BA3200_application::user_destroy()
|
||||
|
Loading…
x
Reference in New Issue
Block a user