OnPostReport Location

suttons27suttons27 Member Posts: 5
Hi,

I am looking for the OnPostReport Trigger, I do not see any Report Triggers, only section & dataitem triggers. Is there a hotkey or a menu item I am overlooking?

I purchased the book Microsoft Dynamics NAV 2009: Professional Reporting, it references this trigger but does not explain how to access it.

The reason: I am trying to use CurrReport.NEWPAGE to create a blank page after a Sales Invoice. I have placed CurrReport.NEWPAGE in several sections and data item triggers, and it places a blank page, but then it either 1 to 100s after the blank page, depending where I put it.

So I would like to create this newpage after the invoice has finally ran. The new page will be used to Thank the customer and put a survey link on it, and we would like a separate page for that.

Thanks in advance

Comments

  • KishormKishorm Member Posts: 921
    Go to the last dataitem and then cursor down to get onto a blank line and then press F9 to get to the code - you will the find the trigger
  • suttons27suttons27 Member Posts: 5
    Thanks that worked, so I just learned CurrReport.NEWPAGE can not be used as a Report Trigger.

    I have found Report.RunModal(Report #, False, False, Record Number)

    I have created a new report 50008

    Report.RunModal(50008, False, True) works great, except I have to enter in the Record # (happens to be the SOxxxx) into the filter and it pulls up my Thank You Report and Survey with correct data.

    How do I autofill Report.RunModal(50008, False, False, XXXX) the XXXX part with the "SOxxxx" # dynamically
  • KishormKishorm Member Posts: 921
    The 4th parameter is not record number but is an actual record. You should apply a filter on the record and then pass the record as the 4th parameter. You could use setrecfilter if you are filtering on a single record...

    "http://msdn.microsoft.com/en-us/library/dd301127.aspx"
Sign In or Register to comment.