In this post, we will have a look at the rendering property in the report object. This feature allows having multiple layouts for the same report.

This feature was released in Business Central 2022 wave 1 (BC20).

Let´s see how it works.


Rendering

A new section called ‘rendering’ can now be added to the report. For this example, I have created a simple report with ‘Customer’ as the only dataitem.

Then, added the new render section. Inside it, we can define as many layouts as we need. I´ve defined two ‘.rdl’ layouts, a ‘.docx’ and a ‘.xlsx’ layout.

Yes, we can have excel layouts from now on. Check Stefano´s post about it:

Note that a new property has been added as well. It´s called ‘DefaultRenderingLayout’. Here, we can select which layout (out of the four in this case) should be used as the default. Here is a look at it:

When we compile the solution, four new files are created. Each one with its corresponding format:


We can work now on our layouts as we want. All layouts are created empty by default except for the excel. The system has already created a table with the available fields in the dataset. We will see how it behaves in more complex situations.



Checking the report layouts

Once we are done building the layouts, we can publish the report to Business Central.

If we navigate now to the ‘Report Layout Selection’ page we can select all the layouts that are available for the report:

The user can also upload new layouts, export or replace them:

Video test:


For more information about this feature follow the Microsoft docs:

https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-multiple-report-layouts

That´s all. Hope you find it useful.

If interested, check out this other article on how to boost performance in Business Central.



Rendering Report Layouts In Business Central

Post navigation


Leave a Reply

Your email address will not be published. Required fields are marked *