Patch level : 10.0
Files correlati : lv2.exe Ricompilazione Demo : [ ] Commento : Corretta gestione variabili globali di report git-svn-id: svn://10.65.10.50/trunk@18018 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7f911b078b
commit
d3491a2b2e
@ -1,7 +1,8 @@
|
||||
#include <Textset.h>
|
||||
#include <Applicat.h>
|
||||
#include <Automask.h>
|
||||
#include <Reprint.h>
|
||||
#include <applicat.h>
|
||||
#include <automask.h>
|
||||
#include <textset.h>
|
||||
#include <reprint.h>
|
||||
|
||||
#include "lv0.h"
|
||||
#include "lv2300a.h"
|
||||
|
||||
@ -15,13 +16,13 @@ public:
|
||||
//ordine fermata e eventualmente l'ora
|
||||
struct TPassaggio: public TObject
|
||||
{
|
||||
|
||||
long _codcf;
|
||||
int _ordfer;
|
||||
int _ora;
|
||||
TString _iter;
|
||||
TPassaggio():_codcf(0),_ordfer(0),_ora(0),_iter("") {}
|
||||
TPassaggio(long codcf, int ordfer, int ora, TString iter):_codcf(codcf),_ordfer(ordfer),_ora(ora),_iter(iter) {}
|
||||
TString4 _iter;
|
||||
|
||||
TPassaggio() :_codcf(0),_ordfer(0),_ora(0) {}
|
||||
TPassaggio(long codcf, int ordfer, int ora, const TString& iter) :_codcf(codcf),_ordfer(ordfer),_ora(ora),_iter(iter) {}
|
||||
};
|
||||
|
||||
class TPassaggi: public TArray
|
||||
@ -60,14 +61,10 @@ void TPassaggi::add(TPassaggio* p)
|
||||
break;
|
||||
|
||||
if(h._ordfer>p->_ordfer)
|
||||
{
|
||||
last=guess-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
first=guess+1;
|
||||
}
|
||||
}
|
||||
TArray::insert(p,guess);
|
||||
_count++;
|
||||
}
|
||||
@ -159,7 +156,7 @@ TSettimana& TItinerari::settimana(long codIti)
|
||||
TSettimana* a = (TSettimana*)objptr(codIti);
|
||||
if(a==NULL)
|
||||
{
|
||||
a = new TSettimana();
|
||||
a = new TSettimana;
|
||||
TArray::add(a,codIti);
|
||||
}
|
||||
return *a;
|
||||
@ -259,8 +256,13 @@ void TGiri_app:: elabora(const TMask& mask)const
|
||||
}
|
||||
}
|
||||
|
||||
//carica tuute le variabili del report.
|
||||
r.mask2report(mask);
|
||||
// riporta tutte le variabili del report.
|
||||
const TString_array& vars = giri.variables();
|
||||
FOR_EACH_ARRAY_ROW(vars, v, var)
|
||||
{
|
||||
const char* varname = var->get(0);
|
||||
giri_set->set_var(varname, giri.get_var(varname), true);
|
||||
}
|
||||
|
||||
TReport_book b;
|
||||
bool ok = b.add(r);// Richiede parametri di stampa in base alla maschera omonima
|
||||
@ -278,22 +280,17 @@ void TGiri_app::main_loop()
|
||||
TGiri_mask m;
|
||||
while(m.run()==K_ENTER)
|
||||
{
|
||||
//Stampa Giro Settimanale
|
||||
if(m.get(F_CHOICE)=="S")
|
||||
{
|
||||
elabora(m);
|
||||
elabora(m); //Stampa Giro Settimanale
|
||||
}
|
||||
//Stampa Giro Giornaliero
|
||||
else
|
||||
{
|
||||
TGiri_report r(false);
|
||||
|
||||
//carica tuute le variabili del report.
|
||||
r.mask2report(m);
|
||||
|
||||
TGiri_report r(false); //Stampa Giro Giornaliero
|
||||
TReport_book b;
|
||||
bool ok = b.add(r); // Richiede parametri di stampa in base alla maschera omonima
|
||||
if (ok)
|
||||
{
|
||||
if (b.pages() > 0)
|
||||
b.print_or_preview(); // Stampa effettivamente
|
||||
else
|
||||
@ -301,6 +298,7 @@ void TGiri_app::main_loop()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int lv2300(int argc, char* argv[])
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user