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
|
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
|
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);
|
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 TReport::execute_prescript()
|
||||||
{
|
{
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
|
if (compile_prescript())
|
||||||
|
ok = _prescript.execute(*this);
|
||||||
|
|
||||||
warm_restart();
|
bool bAsk = ok;
|
||||||
if (_prescript.ok())
|
|
||||||
{
|
// Script dei poveri: lancia la maschera associata al report
|
||||||
ok = _prescript.execute(*this);
|
if (bAsk && use_mask())
|
||||||
if (recordset() != NULL)
|
{
|
||||||
recordset()->ask_variables(false);
|
TFilename msk = _path.name(); msk.ext("msk");
|
||||||
}
|
if (msk.custom_path())
|
||||||
else
|
{
|
||||||
{
|
TFilename ini = msk; ini.ext("ini");
|
||||||
bool bAsk = true;
|
// Attenzione: se esiste il .ini allora e' una maschera delle vendite!
|
||||||
|
if (!ini.exist())
|
||||||
// Script dei poveri: lancia la maschera associata al report
|
|
||||||
if (use_mask())
|
|
||||||
{
|
|
||||||
TFilename msk = _path.name(); msk.ext("msk");
|
|
||||||
if (msk.custom_path())
|
|
||||||
{
|
{
|
||||||
TFilename ini = msk; ini.ext("ini");
|
bAsk = false; // Non richiedere variabili
|
||||||
// Attenzione: se esiste il .ini allora e' una maschera delle vendite!
|
const KEY key = run_form(msk.name());
|
||||||
if (!ini.exist())
|
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)
|
if (bAsk)
|
||||||
{
|
{
|
||||||
// Script dei poverissimi: chiede le eventuali variabili
|
// Script dei poverissimi: chiede le eventuali variabili
|
||||||
if (recordset() != NULL)
|
if (recordset() != NULL)
|
||||||
recordset()->ask_variables(false);
|
recordset()->ask_variables(false);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
|
@ -619,7 +619,9 @@ public:
|
|||||||
void set_prescript(const char* src);
|
void set_prescript(const char* src);
|
||||||
const TString& postscript() const;
|
const TString& postscript() const;
|
||||||
void set_postscript(const char* src);
|
void set_postscript(const char* src);
|
||||||
|
|
||||||
virtual bool execute_dot(const TVariant& var);
|
virtual bool execute_dot(const TVariant& var);
|
||||||
|
virtual bool compile_prescript();
|
||||||
virtual bool execute_prescript();
|
virtual bool execute_prescript();
|
||||||
virtual bool execute_postscript();
|
virtual bool execute_postscript();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user