campo-sirio/ps/pd6030100.cpp

77 lines
1.6 KiB
C++
Raw Normal View History

#include <applicat.h>
#include <automask.h>
#include <reprint.h>
#include "pd6030.h"
#include "pd6030100.h"
class TMaskpd60301 : public TAutomask
{
protected:
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
public:
TMaskpd60301() : TAutomask("pd6030100") { }
virtual ~TMaskpd60301() { }
};
bool TMaskpd60301::on_field_event(TOperable_field& o, TField_event e, long jolly)
{
return TRUE;
}
class TStampaClientipd6030 : public TSkeleton_application
{
virtual bool check_autorization() const {return false;}
virtual const char * extra_modules() const {return "cg";}
protected:
virtual void main_loop();
public:
};
void TStampaClientipd6030::main_loop()
{
TMaskpd60301 m;
while (m.run() != K_QUIT)
{
TReport_book book;
TReport rep;
TFilename report_name("pd6030100b");
report_name.ext("rep");
report_name.custom_path();
if (rep.load(report_name))
{
TRecordset * r = rep.recordset();
if (r != NULL)
{
TVariant var;
var = m.get(F_PD6030_TYPE);
r->set_var("#F_PD6030_TYPE", var);
var = m.get_long(F_PD6030_SORT);
r->set_var("#F_PD6030_SORT", var);
var = m.get(F_DACODCF);
r->set_var("#DACODCF", var);
var = m.get(F_ACODCF);
r->set_var("#ACODCF", var);
var = m.get(F_DARAGSOC);
r->set_var("#DARAGSOC", var);
var = m.get(F_ARAGSOC);
r->set_var("#ARAGSOC", var);
}
book.add(rep);
if (book.pages() > 0)
book.print_or_preview();
}
}
}
int pd6030100(int argc, char* argv[])
{
TStampaClientipd6030 a;
a.run(argc, argv, "Stampa Clienti PressColor");
return 0;
}