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:
guy 2011-12-23 14:14:44 +00:00
parent 866b8ba912
commit 212275a5db
2 changed files with 38 additions and 31 deletions

View File

@ -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,23 +2426,25 @@ 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())
warm_restart();
if (_prescript.ok())
{
ok = _prescript.execute(*this); ok = _prescript.execute(*this);
if (recordset() != NULL)
recordset()->ask_variables(false); bool bAsk = ok;
}
else
{
bool bAsk = true;
// Script dei poveri: lancia la maschera associata al report // Script dei poveri: lancia la maschera associata al report
if (use_mask()) if (bAsk && use_mask())
{ {
TFilename msk = _path.name(); msk.ext("msk"); TFilename msk = _path.name(); msk.ext("msk");
if (msk.custom_path()) if (msk.custom_path())
@ -2460,7 +2466,6 @@ bool TReport::execute_prescript()
if (recordset() != NULL) if (recordset() != NULL)
recordset()->ask_variables(false); recordset()->ask_variables(false);
} }
}
return ok; return ok;
} }

View File

@ -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();