19
Now that we have Report Extensions
see:
- https://experience.dynamics.com/ideas/idea/?ideaid=33aff58b-8fab-e811-b96f-0003ff68aa60
- https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-report-ext-object

it would be very helpful if we could get generic report trigger events, similar to table/page trigger events.

[EventSubscriber(ObjectType::Report, Report::"Standard Sales - Invoice", 'OnBeforeAfterGetRecord', 'Header', false, false)]
local procedure OnBeforeAfterGetRecord(Preview: Boolean; var Header: Record "Sales Invoice Header")
begin

end;
[EventSubscriber(ObjectType::Report, Report::"Standard Sales - Invoice", 'OnAfterAfterGetRecord ', 'Header', false, false)]
local procedure OnAfterAfterGetRecord(Preview: Boolean; var Header: Record "Sales Invoice Header")
begin

end;

if we get the report triggers like OnAfterAfterGetRecord as new event we could more easily integrate into standard reports.




Additionaly I would love a generic report event that is called for every report and every dataitem.
Category: Development
STATUS DETAILS
Needs Votes
Ideas Administrator

Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team

Comments

K

While I think the idea makes sense, I feel like such events will be quite limited though, without a way to get e.g. request page options, other protected variables, other data items, the Sender/CurrReport, etc.

Does MS have a policy on when things should be extensions, versus when they should be events? I feel like events might be difficult to integrate with reports, because they depend on so many variables and so much state, as above

Category: Development