The preview environment for Dynamics 365 Business Central 2021 release wave 1 (BC18) is available now. Learn more: https://yzhums.com/10601/.
I will test and share some new features that I hope will help.
A very common scenario is to customize reports by adding more fields to the dataset and modifying the layout. Until now, you would have to take full ownership of the report dataset (for example, a copy) just to make small changes, thereby forcing partners to maintain a full report and prohibiting multiple ISV contributions to the same report in an extensible way. With report extensibility, a new report extension object can be created, which adds new fields to the dataset or a new layout.
Ability to extend an existing report by making additive changes to the report dataset and request page. Report layouts will not have an extensibility model.
As you might know, it was impossible to extend standard reports in Business Central until version BC17. If you only need to add one field to the standard report, you must make a complete copy of the standard report and create a new report. Then add new field to the new report.
For more details: How to extend standard report in Dynamics 365 Business Central
But now, with AL 7.0 and Dynamics 365 Business Central 2021 Wave 1 (BC 18), you can extend an existing report by a new object type, ReportExtension.
My test info:
The standard Report Extension snippet: treportext
You can add changes to dataitems, columns, and the requestpage. (This looks a bit like PageExtension)
You can select the standard report that need to be extended.
For example: “Standard Sales – Order Conf.”
Note: If you select a report with a mid-column line, there will be a warning.
Report ‘Sales – Credit Memo’ is marked for removal. Reason: Replaced with report 1307 Standard Sales – Credit Memo. Tag: 15.2.
Next, let’s do a simple example:
1. add a new field in Sales Header and Sales Line respectively.
On the Sales Order page:
2. We need to add a new column to the standard Header dataitem in “Standard Sales – Order Conf.”.
Choose add in dataset.
Enter Header. Then you can see the fields in the Header dataitem.
Add the new field you just customized.
3. The same goes for the field in the Sales Line.
4. Because you cannot extend Layout via ReportExtension, you have to copy a new layout on the Report Layout Selection.
This time, RDLC is used as an example.
Export the custom layout.
Open it by Report Builder, you can find the newly added dataitem in Datasets.
For example: Add these fields to the report layout.
Save it, and then import the layout to Business Central.
Select the custom layout.
OK, let’s try to print the Sales – Confirmation on the Sales Order page.
You can find the new fields have been printed.
1. You can also add a new dataitem to the report like in the following code.
2. You can add the DataItem’s trigger by using modify.
3. You can also add fields to the request page.
4. Please note that Report Extension is not perfect at the moment (2021/03/26). It also has some issues that need to be solved by Microsoft, such as the report triggers. As Mr. Peter said in Yammer, all these issues may be solved at the time of BC18 CU01.
Update 2021/05/07: Business Central 2021 release wave 1 update 1 change log
1. Parameters and captions are now supported report layouts in report extensions
2. Added support for modify on dataitems with a set of triggers to go along with it.
3. You can translate
4. Debugging supported added for report extension
5. There were a couple of issues around adding dataitems into the correct position, which caused layouts to not work correctly.
6. The checks for duplicate usage of identical names did not catch all cases.
Update 2021/04/15: Information from Dynamics 365 Business Central Launch Event 2021 release wave 1
Hope this will help.
Thanks for reading.