How to Substitute Report in Business Central

Today we will see how we can substitute our own document report with Standard report in business central.

To override report we need to use ReportManaagement Codeunit and from that we need to use OnAfterSubstituteReport event

Suppose we have created own customize report called ‘Detail Inventory Transaction’ and now we have to replace standard report for Inventory Transaction Detail

[EventSubscriber(ObjectType::Codeunit, 44, 'OnAfterSubstituteReport', '', true, true)]
    procedure SubstituteInventoryTransactionReport(ReportId: Integer; var NewReportId: Integer)
        If ReportId = Report::"Inventory - Transaction Detail" then
            NewReportId := Report::"Detail Inventory Transaction";

Publish your extension and check the report .You will find new report is substituted with standard report.

Hope this will help you.

Stay tuned for more..


6 thoughts on “How to Substitute Report in Business Central

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.