Get records from caller form to use in report.

Hi everybody,

I have a form InventBatch, I create a a button Print to print a report named B

When user click to select multiple records from this form and click button Print.

It will print a report B with data are from records that we selected from InventBatch form.

I really don’t know how to get those records to pass to report B in fetch() function.

I just know how to get one record

public boolean fetch()
{
boolean ret;
FormDataSource formDataSource;
InventBatch inventBatch1;
QueryRun queryb;

;
ret = super();
inventBatch1 = element.args().record();
element.send(inventBatch1);

return ret;
}

So, please help me !

Appriciate your help !

Hi Phuong

To get multiple records, those are selected on forms, u can use standard way

Take some technical help and u can find codes for, like sales, purchase etc, where u can invoice multiple SO/PO.

Pass the datasource from ur menuItem button, catch the datasource in ur report and put a loop somethin like

for (= _formDS.getFirst(true) ? _formDS.getFirst(true) : _args.record();
;
= _formDS.getNext())

{

ur code…

}

Hope it helps…

Hi Manish,

Thanks for your help. Your solution help me. Thanks a lot [:)]

Phuong Tran.

Hi Mahesh,

How can I fetch all the records from a form ?