Query Range from SysQuery Form Which pop ups when we run report


Can any body please help?

In–>Accounts Recievable–> Periodic–> Sales update–> packing slip–> Click select button–> Sysqyery form pop up.

Where if i put a range of sales order in that form and click ok–> Those sales order are selected in overview tab–> now corresponding to that if i select a sales order in Overview tab i can see its lines in LINE tab page of the same form

NOw i have craeted a tab page named all lines where i want for all the orders selected there shud be all lines shown in that tab.

I am unable to apply that query range given for sales order on salesparm line. Can any body please help me on this?

Hope i made my self clear.



Hi Geethika,

The ‘All Lines’ tab should display all the sales order lines or only the selected sales order’s lines in the ‘overview’ tab ?

Only selected salesorder lines…

If u have some idea please guide

Hey ,

There i want only selected sales order lines.

Please guide me.


Loop through the form data source of the ‘overview’ grid and insert all the sales orders to a container. Use another for loop, to loop through the length of the container and add the ranges to the query datasource of ‘all lines’ tab/grid.

//Initialise the query datasource in the init method of datasource used in gird under ‘all lines’ tab. (Say, salesline)

Query query = new Query();

QueryBuildDataSource queryBuildDataSource = query.addDataSource(tablenum(SalesLine));

//Under active method of ‘SalesParmTable’, call the executeQuery method of datasource used in grid under ‘all lines’ tab (Say, SalesLine) and insert all the salesId in a container


for(salesParmTableLoc = salesParmTableLoc_DS.getFirst(); salesParmTableLoc ; salesParmTableLoc = salesParmTableLoc_DS .getNext())


containerSalesId += SalesParmTableLoc.SalesId;


// Under executeQuery method, write the following code to add the range before super

for(j= 1; j <= conlen( containerSalesId ) ; j++)



queryBuildDataSource.addRange(fieldnum(SalesLine, SalesId)).value(conpeek( containerSalesId ,j));



Hey This option could not work…

I need some clarification on this.

Can i have your emailid.



its raghavendra.j@surya-soft.com