Files correlati : Ricompilazione Demo : [ ] Commento : Stampa Planning per Itinerario git-svn-id: svn://10.65.10.50/trunk@17278 c028cbd2-c16b-5b4b-a496-9718f37d4682
93 lines
1.7 KiB
C++
Executable File
93 lines
1.7 KiB
C++
Executable File
#include "lv0.h"
|
|
//#include "lv2300a.h"
|
|
|
|
#include <applicat.h>
|
|
#include <automask.h>
|
|
#include <modaut.h>
|
|
#include <progind.h>
|
|
#include <recarray.h>
|
|
#include <relation.h>
|
|
#include <reprint.h>
|
|
#include <tabutil.h>
|
|
#include <textset.h>
|
|
|
|
|
|
|
|
class TStampe_planning_mask : public TAutomask
|
|
{
|
|
|
|
private:
|
|
|
|
|
|
public:
|
|
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
|
TStampe_planning_mask (const char* name) : TAutomask(name) {}
|
|
};
|
|
|
|
bool TStampe_planning_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
|
|
class TStampe_planning_app : public TSkeleton_application
|
|
{
|
|
TStampe_planning_mask* _msk;
|
|
|
|
protected:
|
|
virtual bool create();
|
|
virtual bool destroy();
|
|
|
|
public:
|
|
bool transfer();
|
|
virtual void main_loop();
|
|
};
|
|
|
|
bool TStampe_planning_app::create()
|
|
{
|
|
_msk = new TStampe_planning_mask("lv2300a");
|
|
|
|
return TSkeleton_application::create();
|
|
}
|
|
|
|
bool TStampe_planning_app::destroy()
|
|
{
|
|
delete _msk;
|
|
return TApplication::destroy();
|
|
}
|
|
|
|
|
|
void TStampe_planning_app::main_loop()
|
|
{
|
|
TStampe_planning_app app;
|
|
|
|
// Costruisce il nome del report in base alla riga di comando
|
|
TFilename rep;
|
|
if (argc() > 2)
|
|
{
|
|
rep = argv(2);
|
|
rep.ext("rep");
|
|
}
|
|
|
|
TReport r;
|
|
bool ok = r.load(rep); // Controlla l'effettiva esistenza del report
|
|
while (ok)
|
|
{
|
|
TReport_book b;
|
|
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
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
int lv2300(int argc, char* argv[])
|
|
{
|
|
TStampe_planning_app app;
|
|
app.run(argc, argv, "Stampe Planning");
|
|
return 0;
|
|
} |