Send selected records to report from form in Nav2009r2..

Dear Friends,

i am having problem while send the selected records to report parameter from form.

Task is I have a list form from sales header table. when select the multiple records in the form then i have a command button while click that button action is status need to change & print lables for all the selected records.

Problem is: when click on the button status is changing for all the selected records. & lable is printing suppurately.

ex: suppose i have selected 5 records report printing on 5 times means individual files (PDF) are creating. i need 5 pages need create in one file.

Actual Question is How to send multiple records to report parameter.

Written Code on Command Button on push Trigger:

sales header1 : is loc variable for command button(Record : Sales Header)

"Order Paper" : is global variable (Report : Order Paper)

CurrForm.SETSELECTIONFILTER(“sales header1”);

WITH “sales header1” DO

IF FINDSET THEN

REPEAT

IF “Order Status”=“Order Status”:: Ordered THEN

“Order Status”:=“Order Status”:: Picked;

MODIFY;

COMMIT;

CLEAR(OrderPaper);

OrderPaper.GetOrderNo(“No.”,COUNT);

OrderPaper.RUN;

UNTIL NEXT=0;

CurrForm.UPDATE;

Can any one please look & suggest me for accurate result.

Thank & Best Regards,

Srinivas.

hi,

use this sample code as pattern.

Name	DataType	Subtype	Length
orderConfirm	Report	Order Confirmation	
salesHeader	Record	Sales Header	
filterParams	Text		
counter	Integer		

counter := 0;
salesHeader.SETRANGE("Document Type",salesHeader."Document Type"::Order);
salesHeader.FINDFIRST;
REPEAT
  IF filterParams <> '' THEN filterParams := filterParams + '|';
  filterParams := filterParams + salesHeader."No.";
  counter += 1;
UNTIL (salesHeader.NEXT = 0) OR (counter > 4);

salesHeader.SETFILTER("No.", filterParams);
orderConfirm.SETTABLEVIEW(salesHeader);
orderConfirm.RUN;

did it work?

Hi Jonathan,

Ya it’s working fine… Thanks