Report.Run

XaviXavi Member Posts: 26
I am trying to run a report from the codeunit.

1. I have created a temporary table and inserted some records
2. Try to pass the Temporary record variable into the report.Run function. (Report.Run(ReportID,True,False,TempRec)). it seems i cannot pass a temporary rec variable in Report.Run function.

Can it be done another way ? Is there a solution for it?

Thanks in advance,

xavi.

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    I think best way is to define the same temp table as global variable in the report and to fill this with a function. Then you can use it.

    You only need to define the report as a variable instead of the report.run.

    Succes.
  • bbrownbbrown Member Posts: 3,268
    I think Mark's suggestion is the best approach. When you pass a record with the Report.RUN or Report.RUNMODAL you are only passing current key and filters. Navision refetchs the data. This is why a temp table does not work.
    There are no bugs - only undocumented features.
Sign In or Register to comment.