Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Custom Reports and usage of substitute method

(0) ShareShare
ReportReport
Posted on by 1,159

Hi All,

I just want to clarify the usage of Substitude method in SaaS BC.  If you want to add a new field a data set - say purchase order report 1322 and create RDLC version, then you have to create your own report - say 50322, and then also you need to use the substitute method with something like:

codeunit 50100 "Substitute Report" { [EventSubscriber(ObjectType::Codeunit, Codeunit::ReportManagement, 'OnAfterSubstituteReport', '', false, false)] local procedure OnSubstituteReport(ReportId: Integer; var NewReportId: Integer) begin if ReportId = Report::"1322" then NewReportId := Report::"50322"; end; }

This seems to look like a lot of work to add a new field unless there is an easier way?

Thanks

  • Inkey Solutions Profile Picture
    2,037 on at
    RE: Custom Reports and usage of substitute method

    Hi all,

    For one of our requirements to insert the custom field in the business central. We tried following the below mentioned steps:

    >> created a new custom field on the sales order page.

    >> inserted the field in the page extension

    >> created a new report with the help of the given link (navinsights.net/.../adding-a-field-to-a-standard-word-

    report-in-business-central/) As thing blog suggests we have created a new report with the new object number.

    >> build a RDL file

    >> placed that field in the RDL file under a new dataset.

    When we tried to design the report we were only able to see the dataset created by us with one field only.

    How can we use the existing fields in the custom report?

    OR

    Is there any way we can use the existing report to insert the custom field?

    We are following the solution mentioned below:

    community.dynamics.com/.../custom-reports-and-usage-of-substitute-method

    But did not find the relevant result. Can anyone help us with this? 

  • Verified answer
    THE Italian Profile Picture
    on at
    RE: Custom Reports and usage of substitute method

    Unfortunately there is no easier way at the moment.

    It does not exists a report extension object like e.g. table or page extension object.

    This is the way to go for.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,081 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,860 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans