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
@ -1,26 +1,24 @@
|
|||||||
#if defined(EXPORT) || defined(EXPORT_EXCEL) || defined(EXPORT_PDF) || defined(EXPORT_DBF) || defined(EXPORT_TEXT) || defined(ALL_EXPORT)
|
#if defined(EXPORT) || defined(EXPORT_EXCEL) || defined(EXPORT_PDF) || defined(EXPORT_DBF) || defined(EXPORT_TEXT) || defined(ALL_EXPORT)
|
||||||
STRING DLG_OUTPUTD 255 50
|
STRING DLG_OUTPUTD 255 50
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 -3 "Output "
|
PROMPT 1 -3 "Output "
|
||||||
DSELECT
|
DSELECT
|
||||||
END
|
END
|
||||||
STRING DLG_OUTPUTF 60 18
|
STRING DLG_OUTPUTF 60 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 62 -3 "\"
|
PROMPT 62 -3 "\"
|
||||||
END
|
END
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
STRING DLG_REPORT 256 66
|
STRING DLG_REPORT 256 66
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 -2 "Report "
|
PROMPT 1 -2 "Report "
|
||||||
FLAGS "B"
|
FLAGS "B"
|
||||||
RSELECT CLASS_NAME
|
RSELECT CLASS_NAME
|
||||||
CHECKTYPE REQUIRED
|
|
||||||
WARNING "Impossibile trovare un report compatibile"
|
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING DLG_PROFILE 50
|
STRING DLG_PROFILE 50
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 -1 "Profilo "
|
PROMPT 1 -1 "Profilo "
|
||||||
PSELECT
|
PSELECT
|
||||||
END
|
END
|
@ -1713,20 +1713,38 @@ bool TReport_select::check(CheckTime ct)
|
|||||||
{
|
{
|
||||||
TFilename name = field().get();
|
TFilename name = field().get();
|
||||||
|
|
||||||
if (ct == STARTING_CHECK || ct == FINAL_CHECK)
|
if (ct == STARTING_CHECK || ct == RUNNING_CHECK || ct == FINAL_CHECK)
|
||||||
{
|
{
|
||||||
|
TString_array reps;
|
||||||
|
|
||||||
|
list_custom_files("rep", _classe, reps);
|
||||||
if (name.empty())
|
if (name.empty())
|
||||||
{
|
{
|
||||||
TString_array reps;
|
|
||||||
|
|
||||||
list_custom_files("rep", _classe, reps);
|
|
||||||
if (reps.items() > 0)
|
if (reps.items() > 0)
|
||||||
field().set(((TToken_string &)reps[0]).get(0));
|
field().set(((TToken_string &)reps[0]).get(0));
|
||||||
else
|
else
|
||||||
field().set("");
|
field().set("");
|
||||||
}
|
}
|
||||||
if (ct == FINAL_CHECK && field().get().empty())
|
if (ct == RUNNING_CHECK || ct == FINAL_CHECK)
|
||||||
return false;
|
{
|
||||||
|
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
|
if (field().roman()) // Must exist
|
||||||
return name.custom_path();
|
return name.custom_path();
|
||||||
|
@ -23,7 +23,7 @@ bool TReport_application::destroy()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// @cmember Esegue la stampa
|
// @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);
|
rep.set_export_sections(type);
|
||||||
book.add(rep, type);
|
book.add(rep, type);
|
||||||
@ -181,7 +181,7 @@ void TReport_application::main_loop()
|
|||||||
name.add(fname);
|
name.add(fname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_user_key = ' ';
|
||||||
switch (k)
|
switch (k)
|
||||||
{
|
{
|
||||||
case K_PRINT:
|
case K_PRINT:
|
||||||
@ -206,6 +206,8 @@ void TReport_application::main_loop()
|
|||||||
type = _export_visualize;
|
type = _export_visualize;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
type = _export_user;
|
||||||
|
_user_key = k;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,8 +269,13 @@ void TReport_application::main_loop()
|
|||||||
bool ask_filename = name.blank();
|
bool ask_filename = name.blank();
|
||||||
export_type type = _export_printer;
|
export_type type = _export_printer;
|
||||||
|
|
||||||
|
_user_key = ' ';
|
||||||
switch (k)
|
switch (k)
|
||||||
{
|
{
|
||||||
|
case K_ENTER:
|
||||||
|
case K_PRINT:
|
||||||
|
type = _export_printer;
|
||||||
|
break;
|
||||||
case K_EXCEL:
|
case K_EXCEL:
|
||||||
type = _export_excel;
|
type = _export_excel;
|
||||||
break;
|
break;
|
||||||
@ -288,31 +295,32 @@ void TReport_application::main_loop()
|
|||||||
type = _export_visualize;
|
type = _export_visualize;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
type = _export_user;
|
||||||
|
_user_key = k;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
execute_print(b, m, rep, type);
|
execute_print(b, m, rep, type);
|
||||||
switch (k)
|
switch (type)
|
||||||
{
|
{
|
||||||
case K_ENTER:
|
case _export_printer:
|
||||||
case K_PRINT:
|
|
||||||
b.print_or_preview();
|
b.print_or_preview();
|
||||||
break;
|
break;
|
||||||
case K_EXPORT:
|
case _export_generic:
|
||||||
esporta(b, m, rep);
|
esporta(b, m, rep);
|
||||||
break;
|
break;
|
||||||
case K_EXCEL:
|
case _export_excel:
|
||||||
export_excel(name, b, m, rep);
|
export_excel(name, b, m, rep);
|
||||||
break;
|
break;
|
||||||
case K_PDF:
|
case _export_pdf:
|
||||||
export_pdf(name, b, m, rep);
|
export_pdf(name, b, m, rep);
|
||||||
break;
|
break;
|
||||||
case K_TEXT:
|
case _export_text:
|
||||||
export_text(name, b, m, rep);
|
export_text(name, b, m, rep);
|
||||||
break;
|
break;
|
||||||
case K_DBF:
|
case _export_dbase:
|
||||||
export_dbase(name, b, m, rep);
|
export_dbase(name, b, m, rep);
|
||||||
break;
|
break;
|
||||||
case K_VISUALIZE:
|
case _export_visualize:
|
||||||
b.preview();
|
b.preview();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -26,6 +26,8 @@ class TReport_application : public TSkeleton_application
|
|||||||
|
|
||||||
// @access:(INTERNAL) Private Member
|
// @access:(INTERNAL) Private Member
|
||||||
{
|
{
|
||||||
|
KEY _user_key;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual bool create();
|
virtual bool create();
|
||||||
virtual bool destroy();
|
virtual bool destroy();
|
||||||
@ -49,9 +51,10 @@ protected: // TApplication
|
|||||||
// @cmember Ritorna il report
|
// @cmember Ritorna il report
|
||||||
virtual TReport & get_report(const TAutomask & m) pure;
|
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:
|
public:
|
||||||
|
KEY user_key() const { return _user_key; };
|
||||||
virtual short outputdir_id() const { return DLG_OUTPUTD; }
|
virtual short outputdir_id() const { return DLG_OUTPUTD; }
|
||||||
virtual short outputfile_id() const { return DLG_OUTPUTF; }
|
virtual short outputfile_id() const { return DLG_OUTPUTF; }
|
||||||
virtual short report_id() const { return DLG_REPORT; }
|
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); }
|
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);
|
const char * get_output_filename(const TAutomask & mask, const TReport & rep);
|
||||||
// @cmember Costruttore
|
// @cmember Costruttore
|
||||||
TReport_application() { }
|
TReport_application() : _user_key(' ') { }
|
||||||
// @cmember Distruttore
|
// @cmember Distruttore
|
||||||
virtual ~TReport_application() { }
|
virtual ~TReport_application() { }
|
||||||
};
|
};
|
||||||
|
@ -543,7 +543,7 @@ public:
|
|||||||
|
|
||||||
// Internal usage only
|
// Internal usage only
|
||||||
typedef void (*FLDMSG_FUNC)(TReport_field& rf, void* jolly);
|
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
|
class TReport : public TAlex_virtual_machine
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user