Good day to you..…
From this article, I am going to give a solution to a problem which I have seen most of forums. As all of you are aware, still we are not given any proper way to customize a standard report in Dynamics 365 Business Central SaaS version.
Here I am explaining how to create a copy of a standard report from an extension. From that you all can customize a copy of any standard report. To fulfill this scenario, there are 3 main steps.
- Copy the standard report AL code to an extension.
- Create a copy of the standard report layout.
- Merge the AL code and the report layout.
In Business Central SaaS version, Microsoft has not facilitated us to view the base application code directly. But here I am going to copy the AL code of the standard report from the base application library. For that i have already installed the AZ AL Dev Tools/AL Code Outline tool in VS code. Using that tool I can go to the definition of the report. After copying the whole code of the report, I am pasting it in another AL file which is going to be published as a new report. For an example, here I am copying the Aged Account Receivable Report as an extension. Then change the id to 50k range and rename the report. Here I have only the AL code, so I have to find the exact layout matching with this AL code.
Ok. 1st step is done.
2.Create a copy of the standard report layout.
As all you know we can create any number of custom layouts for any report. So I am going to create a custom layout of the standard report. Here I am creating a copy from the built-in layout. Because we want the original layout of the standard report. Then using the Export Layout option i can download the layout as rdl format. Now i have both AL code and as well as the layout. Next step is explained how to merge these two files.
3.Merge the AL code and the report layout.
When we are creating a report as an extension we can define the path of the layout file in AL code. So i am mapping the downloaded rdl file as the layout of this report. Using Ctr + B, build the object. Now I have an exact copy of the standard report with its all functionalities. Now I can do any modification I want.
Hope this will help you.
Please provide your feedback with a comment.
Thank you and Regards,
Chameera Kavinda
Hello,
ReplyDeleteI'm facing a challenge in copying the report code. When open the report from base application and select go to definition it's only showing the variables in the code without the other code. May you assist me...
See what Chameera said at step 1: "For that i have already installed the AZ AL Dev Tools/AL Code Outline tool in VS code." AZ AL Dev Tools/AL Code Outline is an extension for Visual Studio Code. Among other things, it enables you to view the complete definition of Base Application Objects. Still not working?
ReplyDelete