Patch level : 10.0
Files correlati : ca1.exe Ricompilazione Demo : [ ] Commento : Migliorata gestione richiesta parametri di stampa report git-svn-id: svn://10.65.10.50/branches/R_10_00@22534 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
866b8ba912
commit
212275a5db
@ -1967,7 +1967,11 @@ TReport_field::~TReport_field()
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
void TReport::build_section_key(char type, int level, TString& key) const
|
||||
{ key.format("%c%d", type, level); }
|
||||
{
|
||||
CHECK(strchr("BHF", type), "Invalid section type");
|
||||
CHECKD(level >= 0 && level <= 999999, "Invalid section level ", level);
|
||||
key.format("%c%d", type, level);
|
||||
}
|
||||
|
||||
TReport_section* TReport::find_section(char type, int level) const
|
||||
{
|
||||
@ -2422,44 +2426,45 @@ bool TReport::execute_dot(const TVariant& var)
|
||||
return TAlex_virtual_machine::execute_dot(var);
|
||||
}
|
||||
|
||||
bool TReport::compile_prescript()
|
||||
{
|
||||
bool ok = false;
|
||||
warm_restart();
|
||||
if (_prescript.ok())
|
||||
ok = _prescript.compile(*this);
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool TReport::execute_prescript()
|
||||
{
|
||||
bool ok = true;
|
||||
if (compile_prescript())
|
||||
ok = _prescript.execute(*this);
|
||||
|
||||
warm_restart();
|
||||
if (_prescript.ok())
|
||||
{
|
||||
ok = _prescript.execute(*this);
|
||||
if (recordset() != NULL)
|
||||
recordset()->ask_variables(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
bool bAsk = true;
|
||||
|
||||
// Script dei poveri: lancia la maschera associata al report
|
||||
if (use_mask())
|
||||
{
|
||||
TFilename msk = _path.name(); msk.ext("msk");
|
||||
if (msk.custom_path())
|
||||
bool bAsk = ok;
|
||||
|
||||
// Script dei poveri: lancia la maschera associata al report
|
||||
if (bAsk && use_mask())
|
||||
{
|
||||
TFilename msk = _path.name(); msk.ext("msk");
|
||||
if (msk.custom_path())
|
||||
{
|
||||
TFilename ini = msk; ini.ext("ini");
|
||||
// Attenzione: se esiste il .ini allora e' una maschera delle vendite!
|
||||
if (!ini.exist())
|
||||
{
|
||||
TFilename ini = msk; ini.ext("ini");
|
||||
// Attenzione: se esiste il .ini allora e' una maschera delle vendite!
|
||||
if (!ini.exist())
|
||||
{
|
||||
bAsk = false; // Non richiedere variabili
|
||||
const KEY key = run_form(msk.name());
|
||||
ok = key != K_ESC && key != K_QUIT;
|
||||
}
|
||||
bAsk = false; // Non richiedere variabili
|
||||
const KEY key = run_form(msk.name());
|
||||
ok = key != K_ESC && key != K_QUIT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bAsk)
|
||||
{
|
||||
// Script dei poverissimi: chiede le eventuali variabili
|
||||
if (recordset() != NULL)
|
||||
recordset()->ask_variables(false);
|
||||
}
|
||||
if (bAsk)
|
||||
{
|
||||
// Script dei poverissimi: chiede le eventuali variabili
|
||||
if (recordset() != NULL)
|
||||
recordset()->ask_variables(false);
|
||||
}
|
||||
|
||||
return ok;
|
||||
|
@ -619,7 +619,9 @@ public:
|
||||
void set_prescript(const char* src);
|
||||
const TString& postscript() const;
|
||||
void set_postscript(const char* src);
|
||||
|
||||
virtual bool execute_dot(const TVariant& var);
|
||||
virtual bool compile_prescript();
|
||||
virtual bool execute_prescript();
|
||||
virtual bool execute_postscript();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user