report and DataItemTable

cfvcfv Member Posts: 19
Hello,
In a codeunit, how can I identify on which tables a report is based on ?
I know the report ID and before opening it, i want to be sure that this report is based on the table i want to pass in parameters.

In this example :
how to be sure that the report I want to open is based on the table ptr_doc ?
(REPORT.RUNMODAL(SelEtat."ID état",TRUE,FALSE,Ptr_doc).
Thanks a lot for your help.

Comments

  • tinoruijstinoruijs Member Posts: 1,226
    You can't.
    But if you could, what would you do?
    Now if someone changes the dataitems in a report you are calling from a codeunit, you will receive an error.

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • cfvcfv Member Posts: 19
    I think it would have been interessant to to this control before openning a report. If it's not possible, no matter.

    I've created an "Universal document" which can editate sales quotes, sales order or invoiced sales. This dataitem is not based on the table "sales header" or the table "sales invoice header". As this report is not used in all the companies i want to do this control for example in the codeunit 229 "Document-Print" in order to pass the good table in parameters.

    Thank you.
  • tinoruijstinoruijs Member Posts: 1,226
    Ok. Thanks for explaining why you would want it.
    That makes it clear. :)

    Tino Ruijs
    Microsoft Dynamics NAV specialist
Sign In or Register to comment.