Hi, Readers.
Today I would like to share a question I saw recently in the Business Central forums, why are columns/fields added via Report Extension not found in standard layouts exported from Report Layouts page?
Until now, if we need to modify the report layout after adding new columns/fields, we can simply operate in Report Layout Selection page.

To create a custom layout, either copy an existing custom layout or add a new custom layout. Custom layouts are often based on a built-in layout. When you add a new custom layout, you can choose to add either an RDLC or a Word report layout type, or both. The new custom layout will be based on the built-in layout for the report, if one is available. If there’s no built-in layout for the report type, a new blank layout is created. You’ll have to modify and design this blank layout from scratch.



This layout will contain the newly added columns/fields.

But Microsoft has informed that Custom report layouts is a legacy feature. More details: (Legacy) Create and modify custom report layouts
Custom report layouts is a legacy feature that is being phased out. Instead, you should start creating user-defined layouts as described here.

Why? Starting from Business Central 2022 wave 1 (BC20), Microsoft released a new way to manage layouts, Report Layouts page.

We can create a new layout on the new page. For example,




More details: Business Central 2022 wave 1 (BC20): New pages for report layout administration (page 9660 “Report Layouts”)
We have discussed a question before, the layouts we added previously in Custom Report Layouts are not displayed in the new page (Report Layouts). More details: Dynamics 365 Business Central: Add Custom Report Layouts to Report Layouts (Migrate to System Layouts)

But there’s another little problem here. If we export the standard layout, it does not include the newly added columns/fields. Let’s see some details.
This time I used the example in Dynamics 365 Business Central: How to add Media or MediaSet data type (Pictures) to a report.

Choose Export Layout on the Report Layouts page.

For example, in the Word layout below, the custom fields above are not found.

Why? Because we need one more step, update the layout.
So we need to choose Update and Export Layout.
Update and Export Layout
Export the selected layout file using the current report dataset design.

Now you can find the new columns/fields.

Test video:
Additionally, there is a very nice method for updating an existing layout, Export Report Schema: Export report schema as a Microsft Word Custom Xml document (xml file).


This includes custom columns/fields.

And this file can be added to an existing word document by clicking Developer -> (Add new part……)

Then you can find it custom columns/fields the newly added XML Part.

Very simple, give it a try!!!😁
END
Hope this will help.
Thanks for reading.
ZHU
コメント