campo-sirio/ca/ca1500.cpp
alex daf18a0b31 Patch level : 2.2 66
Files correlati     :  ca1.exe
Ricompilazione Demo : [ ]
Commento            :

Prima bozza stampe anagrafiche


git-svn-id: svn://10.65.10.50/trunk@12882 c028cbd2-c16b-5b4b-a496-9718f37d4682
2005-04-01 07:09:14 +00:00

68 lines
1.1 KiB
C++
Executable File

#include <applicat.h>
#include <reprint.h>
#include "ca1.h"
#include "ca1500a.h"
#include "calib01.h"
#include "calib02.h"
class TPrint_cdc : public TSkeleton_application
{
bool create();
public:
virtual void main_loop();
};
bool TPrint_cdc::create()
{
const TMultilevel_code_info& mci = ca_multilevel_code_info(LF_CDC);
if (mci.levels() <= 0)
return error_box(TR("I centri di costo non sono stati configurati"));
return TSkeleton_application::create();
}
void TPrint_cdc::main_loop()
{
TFilename path;
TMask m("ca1500a");;
while (m.run() == K_ENTER)
{
TReport_book book;
TAnal_report rep;
path = m.get(F_REPORT);
if (path.empty())
path = "ca1500";
path.ext("rep");
path.custom_path();
if (rep.load(path))
{
TRecordset * r = rep.recordset();
if (r != NULL)
{
TVariant var;
var = m.get(F_DACDC);
r->set_var("#DACDC", var);
var = m.get(F_ACDC);
r->set_var("#ACDC", var);
}
}
book.add(rep);
book.print_or_preview();
}
}
int ca1500(int argc, char* argv[])
{
TPrint_cdc a;
a.run(argc, argv, TR("Stampa centri di costo"));
return 0;
}