Hello Readers,
I hope everyone is safe in this pandemic, as year is not going good, but technology is growing fast and helping people in this crucial time.
Microsoft has released a new Business Central version 2021 Wave 1 (BC 18), with many new features.
One of the interesting feature out of them is Report Extension, this features helps developers to modify the standard reports.So now onward no need to copy the standard report and then doing the modification in the same.
This feature extend an standard/existing report by making additive changes to the
report dataset and request page.
Lets see how to create the report extension in Business Central.
Step 1. Open the VS Code and create a new AL project using the below highlighted target platform or the later version.
Step 2. Check the App.json Application ID must be 18 or above.
Step 3. Now create a new .al file and give the name.
and type treport and select the below one.
Step 4. In below example I am adding a “Document Date” column into the Customer Statement Report.
For that I have added the below code.
Modify the “Detailed Cust. Ledg. Entry” Data Set to write the code to get the “Document Date” from the “Customer Ledger Entry” Table.
And the same has been added into “Detailed Cust. Ledg. Entry” Data Set as a “DocumentDateExt”.
Step 5. Next publish the code and navigate to Custom Report Layout and create new custom report layout for Customer statement report.
Step 6. Now export the Standard layout and add a “Document Date” column as show below.
Step 7. Save the modified layout and navigate back to Custom Report Layout and import the rdl file and update the same layout.
Step 8. Time to test the report, run the report and check the column values.
I hope you liked the blog, stay tuned for more updates.
Thank you,
Anish Agrawal
NAV/Business Central Developer
Connect me on : +91-9770757595
Linkedin :Anish Agrawal
Very Helpful article and functionality.
Very helpful