mardi 18 septembre 2012

Pass Query from dialog to Form and Filter records


Created a Runbase class which has dialog selection using QueryStr.
I need to pass this Query range selection to a form and need to filter records based on this query Selection. Call the form by passing the Query selection from the class
Args _args;
FormRun _formRun;
EmplId _empId;
;
_args = new Args(); // creating a object for args class
_args.name(formstr(xtgCummeInquiry)); // Form Menuitem
_args.caller(this); // Form Caller(Current Form is mentioned as this)
_args.object(CummeQueryRun.query());
_formRun = ClassFactory.formRunClass(_args);
//new FormRun(_args);
// Creating object for FormRun
_formRun.init(); // Form Initialization for Load
_formRun.run(); // Form Run for process
_formRun.wait(); // Form Wait for Display
and from the called form run method,assign the Query range value to the form datasource
public void run()
{
boolean ret;
Query q;
DictField dictField;
str fieldLabel;
Addressing PrintRange;
int i, j, rangeCount;
QueryBuildRange QBR;
QueryRun Qrun;
super();
if(element.args().caller())
{
CallerOBJ = element.args().caller();
Qrun = CallerObj.QueryRun();
q = QRun.query();
for(i = 1; i <= q.dataSourceCount(); i++)
{
rangeCount = q.dataSourceNo(i).rangeCount();
for(j = 1; j <= rangeCount; j++)
{
QBR = q.dataSourceNo(i).range(j);
dictField = new DictField(QBR.table(),fieldname2id(QBR.table(),QBR.name()));
fieldLabel = dictField.label();
if(QBR.value())
{
CummeTransTable_q.dataSourceTable(QBR.table()).addRange(fieldname2id(QBR.table(),QBR.name())).value(QBR.value());
}
}
}
}
CummeTransTable_ds.executeQuery();
}

1 commentaire:

  1. This information birds the particular boasts with the supporter of this diet habits, makes use of poor yet common kinds of “ evidence” to help all those cases, after which you can ends by using a feel involving untrue stabilize: “ Like all other healthy eating plan, you'll find at the same time believers along with critics, and yet to numerous your Paleo diet regime merely usually understand. https://imgur.com/a/pcTkdy0 http://axyjxcs3jx.dip.jp https://imgur.com/a/T4w8njA https://imgur.com/a/EO8GUmJ https://imgur.com/a/pam1MEW https://imgur.com/a/G0b26y9 https://imgur.com/a/6c6XybB

    RépondreSupprimer