Hello Readers,
Hope you’re doing well.
In this article we will see Substituting a Reports, this feature is widely used in the Business Central where report extension is not available, the concept is to replace a report for another report through out the Business Central / Dynamics NAV.
For the customized standard reports , we have to create a copy of the standard report and develop a custom report with the changes, to override a base report with your own report is quite difficult and time taking process, using Report Substitute codeunit (ReportManagement) we can easily achieve the same.
How to substitute a report for another report.
To substitute a report, you create a method and subscribe it to the OnAfterSubstituteReport event, as shown in the code below. The OnSubstituteReport
method replaces the report specified by the ReportId
with the one given by the NewReportId
parameter. In this example the "Details Trial Balance
” report will be substituted for "Detail Trial BalanceUPG" report.
Thank you,
Anish Agrawal
NAV/Business Central Developer
Connect me on : +91-9770757595
Linkedin :Anish Agrawal