In any business operations software, the ability to visualize, inspect, and print data in an appropriate layout is paramount. In Dynamics 365 Business Central and in most other software, reports serve these purposes.
Our partner community is familiar with customizing built-in reports, either as suppliers of a vertical solution that adds capabilities to underlying data which must be reflected in the relevant reports, or as resellers who tailor reports to meet individual customer requirements.
In the past, you had to modify existing reports through code customization by directly editing the report object.
In Business Central online, direct customization is not possible. Instead, you add new objects or modifications in a controlled manner through extensions to the base product. The extensions make it easier to deploy, maintain, and upgrade the software.
However, until now you weren’t able to extend report objects, so partners had to copy and branch any report that required modification. These steps were a pain point that incurred costs and a maintenance burden even for the simplest changes. As a result, closing this gap has been the highest voted idea on the Business Central Ideas site year after year.
2021 release wave 1 brings support for report extensions in Dynamics 365 Business Central. You can now extend both document type, visual reports as well as processing reports. You no longer need to branch reports when you add capabilities, and multiple solutions can now add to the same base report dataset. Plus, as a reseller who adds additional customer requirements and custom layouts, you have access to all of the resulting report datasets.
With the introduction of report extensions, there are two approaches to customizing reports:
- Use the event-based substitution of a report, which is useful for taking over reports without changing any actions in the user interface.
- Use the new report extension for making additive changes.
New report extension AL object
Report extensions are based on a new object type in AL, the programming language used for manipulating data and controlling the execution of the various application objects, such as pages, reports, or codeunits. With this object type, you can extend an existing report in several different ways, including the following:
- Add new columns to existing data items.
- Add new nested data items.
- Add columns for fields in a source table, a table extension, related tables, variables, procedures, or expressions.
- Add a new RDLC layout or Word layout.
- Add or modify the request page.
Note that there is no support for extending or modifying an existing layout.
In an upcoming service update, we will add support for labels, as well as some limited abilities to modify existing data items, such as adding to request fields, calc fields, or triggers.
Use report extensions to make additive changes to existing reports, such as adding a country column to the existing customer top 10 list.
Choose layouts from report extensions
When an extension deploys to a customer environment, either as an AppSource app or as a per-tenant extension (PTE), any report layouts in the extension also become available in the environment. However, if you want to apply a report extension layout to a specific report, you need to add installation and upgrade code in the extension. Users will be able to choose a layout from a report extension in the Report Layout Selection page that lists all available layouts for a given report.
The Report Layout Selection page includes any layouts from report extensions so that the user can choose between all available layouts.
Learn more about report extensibility in the release plans, the documentation, or at the virtual launch event session LE21-08 What’s new in Visual Studio code and AL, which covers report extensions in detail. The virtual launch event site has many other valuable sessions on new features in Dynamics 365 Business Central 2021 Wave 1 release.
We encourage you to explore the new report extension feature and provide feedback to our AL GitHub reports. You can also submit any suggestions for additional coverage or improvements on the Business Central Ideas site.