In Microsoft Dynamics 365 Business Central, opening a report for a selected record typically involves a few steps with AL code.
Step 1:
( I have created a report for sales order) on Sales Order List page I have attached Report,
And on Sales Order list page extension on that action of sales order write this code.
REPORT.RUNMODAL(report::”Sales Order List”, TRUE, TRUE, L_RecSalesHeader);
In this line, report::”Sales Order List”, is the report name
Step 2:
I have selected this record then opening report, as shown below picture.
Step 3:
Then it takes No. automatically, which we have selected, also we can select multiple records.
Step 4:
Then it will show an output (taken a small example to understand the concept),
then it will show an output.
This is how you can open a report for selected record.