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)
|
||||
{
|
||||
xvt_vobj_raise(TASK_WIN); // Riporta in primo piano il menu principale
|
||||
if (pages() == 0)
|
||||
{
|
||||
erode_antipa();
|
||||
|
@ -13,15 +13,15 @@
|
||||
|
||||
class TMask_print_table : public TAutomask
|
||||
{
|
||||
|
||||
protected:
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) {return true;}
|
||||
|
||||
public:
|
||||
TMask_print_table(const char * name);
|
||||
virtual ~TMask_print_table() {}
|
||||
};
|
||||
|
||||
TMask_print_table::TMask_print_table(const char * name)
|
||||
TMask_print_table::TMask_print_table(const char* name)
|
||||
:TAutomask(name)
|
||||
{
|
||||
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
|
||||
{
|
||||
TMask * _mask;
|
||||
TMask* _mask;
|
||||
|
||||
protected:
|
||||
void set_custom_filter(TCursor& cursor) const;
|
||||
|
||||
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() { }
|
||||
};
|
||||
|
||||
void TTable_recordset::set_custom_filter(TCursor& cursor) const
|
||||
{
|
||||
CHECK(_mask, "NULL selection mask");
|
||||
|
||||
TRectype from(cursor.curr()); from.zero();
|
||||
TRectype to(from);
|
||||
|
||||
bool key1_full = false;
|
||||
for (int i = _mask->fields() - 1; i >= 0; i--)
|
||||
{
|
||||
TMask_field& f = _mask->fld(i);
|
||||
const TString & val = f.get();
|
||||
|
||||
if (val.full())
|
||||
const TMask_field& f = _mask->fld(i);
|
||||
const TFieldref* ref = f.field();
|
||||
if (ref != NULL && ref->name() == "CODTAB" && !f.empty())
|
||||
{
|
||||
const TFieldref * ref = f.field();
|
||||
|
||||
if (ref != NULL && ref->ok())
|
||||
{
|
||||
const bool is_final = f.in_group(2);
|
||||
|
||||
ref->write(val, is_final ? to : from);
|
||||
}
|
||||
const bool is_final = f.in_group(2);
|
||||
ref->write(f.get(), is_final ? to : from);
|
||||
key1_full = true;
|
||||
}
|
||||
}
|
||||
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
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TTable_report : public TReport
|
||||
{
|
||||
TMask * _mask;
|
||||
TMask* _mask;
|
||||
|
||||
protected:
|
||||
virtual bool set_recordset(const TString& query);
|
||||
@ -110,25 +103,21 @@ public:
|
||||
bool get_rpt_name(TFilename& rptname) const;
|
||||
};
|
||||
|
||||
|
||||
bool TTable_reporter::get_rpt_name(TFilename& rptname) const
|
||||
{
|
||||
TTable tab(argv(2));
|
||||
rptname = tab.module();
|
||||
rptname << "st" << tab.get("COD");
|
||||
rptname << "st" << tab.name();
|
||||
rptname.ext("rep");
|
||||
rptname.lower();
|
||||
|
||||
return rptname.custom_path();
|
||||
}
|
||||
|
||||
void TTable_reporter::main_loop()
|
||||
{
|
||||
TFilename rptname;
|
||||
|
||||
if (get_rpt_name(rptname))
|
||||
{
|
||||
|
||||
TFilename msk(rptname.name()); msk.ext(""); msk.lower();
|
||||
TMask_print_table m(msk);
|
||||
|
||||
@ -159,4 +148,4 @@ int ba3200(int argc, char* argv[])
|
||||
TTable_reporter app;
|
||||
app.run(argc, argv, TR("Stampa Tabelle"));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user