Patch level : 10.0
Files correlati : ba0.exe ba3.exe Ricompilazione Demo : [ ] Commento : Corretto errore nel menu principale (ba0.exe) 0000899: PERDE FOCUS o megli ovà in secondo PIANO Descrizione Se è aperta una videta ed esce, a seguito di un errore la pop up che mi dettaglia l'errore, e quindi esco dalla videata CAMPO perde il focus Potenziata stampa tabelle (ba3.exe) in modo da supportare anche variabili #FROM e #TO git-svn-id: svn://10.65.10.50/trunk@17230 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
9201f7dad5
commit
0030f9a232
@ -227,6 +227,7 @@ bool TBook_window::remove_page(WINDOW page)
|
|||||||
}
|
}
|
||||||
if (bFound)
|
if (bFound)
|
||||||
{
|
{
|
||||||
|
xvt_vobj_raise(TASK_WIN); // Riporta in primo piano il menu principale
|
||||||
if (pages() == 0)
|
if (pages() == 0)
|
||||||
{
|
{
|
||||||
erode_antipa();
|
erode_antipa();
|
||||||
|
@ -13,15 +13,15 @@
|
|||||||
|
|
||||||
class TMask_print_table : public TAutomask
|
class TMask_print_table : public TAutomask
|
||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) {return true;}
|
bool on_field_event(TOperable_field& o, TField_event e, long jolly) {return true;}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TMask_print_table(const char * name);
|
TMask_print_table(const char * name);
|
||||||
virtual ~TMask_print_table() {}
|
virtual ~TMask_print_table() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
TMask_print_table::TMask_print_table(const char * name)
|
TMask_print_table::TMask_print_table(const char* name)
|
||||||
:TAutomask(name)
|
:TAutomask(name)
|
||||||
{
|
{
|
||||||
const int reporty = toolbar() != NULL_WIN ? -2 : -3;
|
const int reporty = toolbar() != NULL_WIN ? -2 : -3;
|
||||||
@ -36,51 +36,44 @@ TMask_print_table::TMask_print_table(const char * name)
|
|||||||
|
|
||||||
class TTable_recordset : public TISAM_recordset
|
class TTable_recordset : public TISAM_recordset
|
||||||
{
|
{
|
||||||
TMask * _mask;
|
TMask* _mask;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void set_custom_filter(TCursor& cursor) const;
|
void set_custom_filter(TCursor& cursor) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TTable_recordset(const char* use, TMask * mask) : TISAM_recordset(use), _mask(mask) { }
|
TTable_recordset(const char* use, TMask* mask) : TISAM_recordset(use), _mask(mask) { }
|
||||||
virtual ~TTable_recordset() { }
|
virtual ~TTable_recordset() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
void TTable_recordset::set_custom_filter(TCursor& cursor) const
|
void TTable_recordset::set_custom_filter(TCursor& cursor) const
|
||||||
{
|
{
|
||||||
CHECK(_mask, "NULL selection mask");
|
CHECK(_mask, "NULL selection mask");
|
||||||
|
|
||||||
TRectype from(cursor.curr()); from.zero();
|
TRectype from(cursor.curr()); from.zero();
|
||||||
TRectype to(from);
|
TRectype to(from);
|
||||||
|
bool key1_full = false;
|
||||||
for (int i = _mask->fields() - 1; i >= 0; i--)
|
for (int i = _mask->fields() - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
TMask_field& f = _mask->fld(i);
|
const TMask_field& f = _mask->fld(i);
|
||||||
const TString & val = f.get();
|
const TFieldref* ref = f.field();
|
||||||
|
if (ref != NULL && ref->name() == "CODTAB" && !f.empty())
|
||||||
if (val.full())
|
|
||||||
{
|
{
|
||||||
const TFieldref * ref = f.field();
|
const bool is_final = f.in_group(2);
|
||||||
|
ref->write(f.get(), is_final ? to : from);
|
||||||
if (ref != NULL && ref->ok())
|
key1_full = true;
|
||||||
{
|
|
||||||
const bool is_final = f.in_group(2);
|
|
||||||
|
|
||||||
ref->write(val, is_final ? to : from);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cursor.setregion(from, to);
|
if (key1_full) // Se e' stato impostato il filtro tramite CODTAB (non #FROM e #TO)
|
||||||
|
cursor.setregion(from, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TTable_report
|
// TTable_report
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
class TTable_report : public TReport
|
class TTable_report : public TReport
|
||||||
{
|
{
|
||||||
TMask * _mask;
|
TMask* _mask;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool set_recordset(const TString& query);
|
virtual bool set_recordset(const TString& query);
|
||||||
@ -110,25 +103,21 @@ public:
|
|||||||
bool get_rpt_name(TFilename& rptname) const;
|
bool get_rpt_name(TFilename& rptname) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
bool TTable_reporter::get_rpt_name(TFilename& rptname) const
|
bool TTable_reporter::get_rpt_name(TFilename& rptname) const
|
||||||
{
|
{
|
||||||
TTable tab(argv(2));
|
TTable tab(argv(2));
|
||||||
rptname = tab.module();
|
rptname = tab.module();
|
||||||
rptname << "st" << tab.get("COD");
|
rptname << "st" << tab.name();
|
||||||
rptname.ext("rep");
|
rptname.ext("rep");
|
||||||
rptname.lower();
|
rptname.lower();
|
||||||
|
|
||||||
return rptname.custom_path();
|
return rptname.custom_path();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TTable_reporter::main_loop()
|
void TTable_reporter::main_loop()
|
||||||
{
|
{
|
||||||
TFilename rptname;
|
TFilename rptname;
|
||||||
|
|
||||||
if (get_rpt_name(rptname))
|
if (get_rpt_name(rptname))
|
||||||
{
|
{
|
||||||
|
|
||||||
TFilename msk(rptname.name()); msk.ext(""); msk.lower();
|
TFilename msk(rptname.name()); msk.ext(""); msk.lower();
|
||||||
TMask_print_table m(msk);
|
TMask_print_table m(msk);
|
||||||
|
|
||||||
@ -159,4 +148,4 @@ int ba3200(int argc, char* argv[])
|
|||||||
TTable_reporter app;
|
TTable_reporter app;
|
||||||
app.run(argc, argv, TR("Stampa Tabelle"));
|
app.run(argc, argv, TR("Stampa Tabelle"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user