D365 Business Central : Substituting Report using ReportManagement codeunit

By standard, Business Central already includes reports that you can use out of the box. Sometimes, the standard report is not enough. You need more fields, more columns, different layouts, different calculations, etc. You will need to change the standard report with your own customized report.

As of now, the Report Extension is not available in Business Central, so you will need to create a new report to replace the existing one.

Let’s give an example. Your client wants to add new fields into Aged Account Payable report. Because you can’t extend the report, you duplicate the standard report into a new one called My Aged Account Payable report.

In the system, you now have two Aged Account Payable reports: the standard one and the one you just created.

To make sure that the users do not select the old ones, you go to the related pages, in this example: Vendor List, hide the standard report and show the new report.

You will also need to tell the user to select the right one when they search for the report because they can see two reports now.

You need to tell the user to select the correct one

Not pretty, but it does the job.

Another way of doing this is to make use of ReportManagement codeunit. Whenever the user run a report, it will trigger an event called OnAfterSubstituteReport. You can subscribe to that event, and replace the report ID with the new one.

I am replacing the standard report with my new report.

Publish the extension and you can see that whenever the user select the standard Aged Account Payable, BC will redirect it to the new one.

thatnavguy

Experienced NZ-based NAV Developer and Consultant with 15+ years of experience leading multiple IT projects, performing business analyst, developing, implementing, and upgrading Dynamics NAV and Business Central. Passionate to deliver solution that focuses on user-friendly interface while keeping high standard of compliance with the needs.

You may also like...

1 Response

  1. 10 October 2020

    […] My Best Friend […]

Leave a Reply

Your email address will not be published. Required fields are marked *