run() Method

public void run()
{
this.query().dataSourceTable(tablenum(InventTransferJour)).addRange(fieldnum(InventTransferJour,TransDate)).value(QueryRange(fromDate,toDate));
this.query().dataSourceTable(tablenum(InventTransferJour)).addRange(fieldNum(InventTransferJour,InventLocationIdFrom)).value(fromWarehouse);
this.query().dataSourceTable(tablenum(InventTransferJour)).addRange(fieldnum(InventTransferJour,InventLocationIdTo)).value(toWarehouse);
super();
}

what is run() method?

also explain above code…Thankx in Advance :slight_smile:

well i working in report and

i m using above method to filter data source table records…whenever a user type fields in dialog fields…

Hi Pratham,

The code which you have written will filter the datasource with your current specified range( probably that would be your dialog field value) in Report & Run method would be fired when you click the Ok in the dialog report.

sir …thank u

i have another question…

suppose i m not using any table as a data source(drag n Drop one)

but i m providing a table buffer in class declaration section …

will this method still work…???

Yes pratham, it will.

You can take a table buffer and write while select statment in fetch method and then using display method you can represent your report design.

Go through this:

http://dynamicsuser.net/forums/p/61211/326582.aspx#326582

http://dynamicsuser.net/forums/p/61160/326673.aspx#326673

#Class Declaration

InventTransferJour _inventTransferJour ; //declaring a table buffer NOT USING TABLE in DATA SOURCE

;

#Run Method

this.query().dataSourceTable(tablenum(_InventTransferJour)).addRange(fieldnum(_InventTransferJour,TransDate)).value(QueryRange(fromDate,toDate));

now this filter work …?