How it works...

The OnAfterSubstituteReport event is fired between when a report is requested to execute and the actual execution. This gives us the chance to intercept that call and replace the report that will be executed.

Don't worry, this event is fired when a user clicks on a report action on a page, or when any of the following commands are executed in the system, which means it will work great for replacing processing reports as well as printed ones:

  • Run
  • RunModal
  • SaveAsHtml
  • SaveAsXml
  • SaveAsPdf
  • SaveAsExcel
  • SaveAsWord
  • RunRequestPage
  • Execute
  • Print
  • SaveAs
When the subscriber is executed, if the incoming ReportId and NewReportId parameters do not match, and NewReportId is not -1, then this means that the report has already been substituted by another subscriber (for example, another Business Central application) and you'll need to determine how to handle that. 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.190.167