Run a report and pass a parameter into the report

tcummingstcummings Member Posts: 3
I have a report which prints up item specification from the item card. I simply passs the item record to the report. Now I want to call the same report from the Sales order where I concatinate all the item numbers into a text field (ex. 'M-AR009A|M-AR010A') and then pass this over to the report to fulfill the request form filtered field. I don't know how to pass a variable instead of a record to the report. The Normal method would be ...


SalesLine.SETFILTER("Document No.","No.");
SalesLine.SETRECFILTER;
REPORT.RUNMODAL(50067,TRUE,FALSE,SalesLine);

Now instead of passing the record I would like to put a variable into the code capturing all the Items to put into the request form Item No field.

Any suggestions?

Comments

  • kinekine Member Posts: 12,562
    1) You need to call the report through report data type variable
    2) You need to create function in the report which will accept the variable and set what you want inside the report
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • krikikriki Member, Moderator Posts: 9,110
    [Topic moved from 'NAV Three Tier' forum to 'NAV/Navision Classic Client' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.