The new preview version of Business Central (BC20) is released. With it, a new report feature is introduced.
This feature allows to have multiple layouts for the same report. Let´s see how it works.
A new section called ‘rendering’ can be added now 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 of 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:
Hope you find it useful.