- Print
- PDF
Standard SSRS Classes and Report Replacement
Event Handlers
Report replacement uses event handlers to hook into the SSRS report rendering process. The main point where a report replacement hooks into the report printing process is SRSReportRunController.parmReportRun method post-event handler. By default, this class uses the SRSReportRunInterface class to pass any report that it is about to render. In the Lasernet replacement case, this SRSReportRunImpl object is replaced with the LACReportReplacementBase class that extends the SRSReportRunImpl class.
Normally, reports are sent to SSRS using the SRSReportRunImpl.runReport method. However, when a class is replaced with LACReportReplacementBase, the runReport method calls the Lasernet report controller to process report rendering. That means that the SSRS server is omitted when running replacement reports.
This approach allows Lasernet to keep all existing functionality on the report, including Print management data and data generation, but avoids unnecessary calls into SSRS.
A similar thing happens with the PreRun method, where, under normal circumstances, TMP data is generated for preprocessed reports like SalesInvoice. In the report replacement case, this method can be skipped using a value from the replacementPreRun custom code class method.