diff --git a/include/report.cpp b/include/report.cpp index 510cdf3e3..d1c9f73ad 100755 --- a/include/report.cpp +++ b/include/report.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -1588,7 +1589,6 @@ void TReport_field::print(TBook& book) const switch (_type) { case 'B': - /* if (is_power_reseller()) { const TReport_rct& rctout = get_draw_rect(); @@ -1608,7 +1608,6 @@ void TReport_field::print(TBook& book) const } } else - */ { print_rect(book); const TString& str = formatted_text(); @@ -2495,6 +2494,45 @@ bool TReport::get_report_field(const TString& name, TVariant& var) const const char* str = name; if (name[0] == '#') { + if (name.starts_with("#CONFIG")) + { + TString field(str+8); + TString para; + int cfg = 0; + + if (field.starts_with("DITTA.")) + { + field.ltrim(6); + cfg = CONFIG_DITTA; + } + else + if (field.starts_with("STUDIO.")) + { + field.ltrim(7); + cfg = CONFIG_STUDIO; + } + if (cfg > 0) + { + int p = field.find('.'); + + if (p >= 0) + { + para = field.left(p); + field.ltrim(p + 1); + } + p = field.find('.'); + if (p > 0) + { + int idx = atoi(field.smid(p + 1)); + + field.cut(p); + var = ini_get_string(cfg, para, field, "", idx); + } + else + var = ini_get_string(cfg, para, field); + return true; + } + } if (name.starts_with("#REPORT.")) { str += 8; diff --git a/include/report.h b/include/report.h index 0b6947a26..cc12b56cb 100755 --- a/include/report.h +++ b/include/report.h @@ -674,4 +674,17 @@ public: virtual ~TReport(); }; -#endif \ No newline at end of file +/////////////////////////////////////////////////////////// +// Report senza maschera +/////////////////////////////////////////////////////////// + +class TProgram_report : public TReport +{ +protected: + virtual bool use_mask() { return false; } + +public: + TProgram_report() {} +}; + +#endif