Patch level : 12.0 1122
Files correlati : ca3.exe ca3100.msk ca3200.msk ca3300.msk ca3600.msk ca3700.msk ca3700b.rep ca3800.msk ca3900.msk Commento : Ripristinata l'esportazione sintetica del rendiconto corretta la selezione dei report era possibile selezionare un report non compatibile
This commit is contained in:
parent
784ec2bba4
commit
6eccb79269
@ -15,8 +15,6 @@ BEGIN
|
||||
PROMPT 1 -2 "Report "
|
||||
FLAGS "B"
|
||||
RSELECT CLASS_NAME
|
||||
CHECKTYPE REQUIRED
|
||||
WARNING "Impossibile trovare un report compatibile"
|
||||
END
|
||||
|
||||
STRING DLG_PROFILE 50
|
||||
|
@ -1713,20 +1713,38 @@ bool TReport_select::check(CheckTime ct)
|
||||
{
|
||||
TFilename name = field().get();
|
||||
|
||||
if (ct == STARTING_CHECK || ct == FINAL_CHECK)
|
||||
{
|
||||
if (name.empty())
|
||||
if (ct == STARTING_CHECK || ct == RUNNING_CHECK || ct == FINAL_CHECK)
|
||||
{
|
||||
TString_array reps;
|
||||
|
||||
list_custom_files("rep", _classe, reps);
|
||||
if (name.empty())
|
||||
{
|
||||
|
||||
if (reps.items() > 0)
|
||||
field().set(((TToken_string &)reps[0]).get(0));
|
||||
else
|
||||
field().set("");
|
||||
}
|
||||
if (ct == FINAL_CHECK && field().get().empty())
|
||||
return false;
|
||||
if (ct == RUNNING_CHECK || ct == FINAL_CHECK)
|
||||
{
|
||||
const TString & repname = field().get();
|
||||
|
||||
if (repname.blank() && ct == FINAL_CHECK)
|
||||
return field().error_box(TR("Il report deve essere specificato"));
|
||||
bool found = false;
|
||||
FOR_EACH_ARRAY_ITEM(reps, r, obj)
|
||||
{
|
||||
TToken_string * row = (TToken_string *)obj;
|
||||
|
||||
found = (repname == row->get(0));
|
||||
if (found)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
return field().error_box(FR("Il report %s non è compatibile"), (const char *)repname);
|
||||
}
|
||||
}
|
||||
if (field().roman()) // Must exist
|
||||
return name.custom_path();
|
||||
|
@ -23,7 +23,7 @@ bool TReport_application::destroy()
|
||||
}
|
||||
|
||||
// @cmember Esegue la stampa
|
||||
void TReport_application::execute_print(TReport_book & book, TAutomask & mask, TReport & rep, export_type type)
|
||||
void TReport_application::execute_print(TReport_book & book, TAutomask & mask, TReport & rep, export_type & type)
|
||||
{
|
||||
rep.set_export_sections(type);
|
||||
book.add(rep, type);
|
||||
@ -181,7 +181,7 @@ void TReport_application::main_loop()
|
||||
name.add(fname);
|
||||
}
|
||||
}
|
||||
|
||||
_user_key = ' ';
|
||||
switch (k)
|
||||
{
|
||||
case K_PRINT:
|
||||
@ -206,6 +206,8 @@ void TReport_application::main_loop()
|
||||
type = _export_visualize;
|
||||
break;
|
||||
default:
|
||||
type = _export_user;
|
||||
_user_key = k;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -267,8 +269,13 @@ void TReport_application::main_loop()
|
||||
bool ask_filename = name.blank();
|
||||
export_type type = _export_printer;
|
||||
|
||||
_user_key = ' ';
|
||||
switch (k)
|
||||
{
|
||||
case K_ENTER:
|
||||
case K_PRINT:
|
||||
type = _export_printer;
|
||||
break;
|
||||
case K_EXCEL:
|
||||
type = _export_excel;
|
||||
break;
|
||||
@ -288,31 +295,32 @@ void TReport_application::main_loop()
|
||||
type = _export_visualize;
|
||||
break;
|
||||
default:
|
||||
type = _export_user;
|
||||
_user_key = k;
|
||||
break;
|
||||
}
|
||||
execute_print(b, m, rep, type);
|
||||
switch (k)
|
||||
switch (type)
|
||||
{
|
||||
case K_ENTER:
|
||||
case K_PRINT:
|
||||
case _export_printer:
|
||||
b.print_or_preview();
|
||||
break;
|
||||
case K_EXPORT:
|
||||
case _export_generic:
|
||||
esporta(b, m, rep);
|
||||
break;
|
||||
case K_EXCEL:
|
||||
case _export_excel:
|
||||
export_excel(name, b, m, rep);
|
||||
break;
|
||||
case K_PDF:
|
||||
case _export_pdf:
|
||||
export_pdf(name, b, m, rep);
|
||||
break;
|
||||
case K_TEXT:
|
||||
case _export_text:
|
||||
export_text(name, b, m, rep);
|
||||
break;
|
||||
case K_DBF:
|
||||
case _export_dbase:
|
||||
export_dbase(name, b, m, rep);
|
||||
break;
|
||||
case K_VISUALIZE:
|
||||
case _export_visualize:
|
||||
b.preview();
|
||||
break;
|
||||
default:
|
||||
|
@ -26,6 +26,8 @@ class TReport_application : public TSkeleton_application
|
||||
|
||||
// @access:(INTERNAL) Private Member
|
||||
{
|
||||
KEY _user_key;
|
||||
|
||||
private:
|
||||
virtual bool create();
|
||||
virtual bool destroy();
|
||||
@ -49,9 +51,10 @@ protected: // TApplication
|
||||
// @cmember Ritorna il report
|
||||
virtual TReport & get_report(const TAutomask & m) pure;
|
||||
|
||||
virtual void execute_print(TReport_book & book, TAutomask & mask, TReport & rep, export_type type = _export_printer);
|
||||
virtual void execute_print(TReport_book & book, TAutomask & mask, TReport & rep, export_type & type);
|
||||
|
||||
public:
|
||||
KEY user_key() const { return _user_key; };
|
||||
virtual short outputdir_id() const { return DLG_OUTPUTD; }
|
||||
virtual short outputfile_id() const { return DLG_OUTPUTF; }
|
||||
virtual short report_id() const { return DLG_REPORT; }
|
||||
@ -66,7 +69,7 @@ public:
|
||||
virtual const char * output_name(const TAutomask & mask, const TReport & rep) const { return report_name(mask); }
|
||||
const char * get_output_filename(const TAutomask & mask, const TReport & rep);
|
||||
// @cmember Costruttore
|
||||
TReport_application() { }
|
||||
TReport_application() : _user_key(' ') { }
|
||||
// @cmember Distruttore
|
||||
virtual ~TReport_application() { }
|
||||
};
|
||||
|
@ -543,7 +543,7 @@ public:
|
||||
|
||||
// Internal usage only
|
||||
typedef void (*FLDMSG_FUNC)(TReport_field& rf, void* jolly);
|
||||
typedef enum { _export_printer, _export_generic,_export_visualize, _export_excel, _export_pdf, _export_text, _export_dbase } export_type;
|
||||
typedef enum { _export_printer, _export_generic,_export_visualize, _export_excel, _export_pdf, _export_text, _export_dbase, _export_user } export_type;
|
||||
|
||||
class TReport : public TAlex_virtual_machine
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user