
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)
begin
If ReportId = Report::"Inventory - Transaction Detail" then
NewReportId := Report::"Detail Inventory Transaction";
end;
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..
how do we get complete vendor purchase order report i.e posted ,released ,open ,etc under a single head in business central d 365 thanks .
LikeLiked by 1 person
how do we get complete vendor purchase order report i.e posted,released open invoiced etc under a single head in business central d 365 thanks.
LikeLiked by 1 person
You need to customize this report
LikeLike