The AL developer preview is still evolving with frequent updates. Follow us on the Dynamics NAV Team Blog for the announcements.


This feature is not supported in Dynamics NAV.

How to: Create an RDL Layout Report

When you create a new report for Dynamics 365 for Finance and Operations, Business edition, there are two things you have to think about; defining the report dataset of data items and columns, and then designing the report layout. These steps will show you how to create a very simple report based on an RDL layout. For more information about the report object, see Report Object.

Creating an RDL layout report


To facilitate testing your report layout, the following example extends the Customer List page with a trigger that runs the report as soon as the Customer List page is opened.

  1. Create a new extension to the Customer List page that contains code to run the report, as well as a simple report object by adding the following lines of code:
pageextension 50123 MyExtension extends "Customer List"
    trigger OnOpenPage();

report 50123 MyRdlReport
    DefaultLayout = RDLC;
    RDLCLayout = 'MyRDLCReport.rdl';

  1. Build the extension (Ctrl+Shift+B) to generate the MyRDLCReport.rdl file.
  2. Add the Customer table as the data item and the Name field as a column to the report by adding the following lines of code:
        dataitem(Customer; Customer)
            column(Name; Name)

  1. Build the extension (Ctrl+Shift+B).
  2. Open the generated report layout file in Microsoft SQL Server Report Builder.
  3. Edit the layout by inserting a table.
  4. Add the Name column from the datasets folder into the table and save the file.
  5. Back in Visual Studio Code, press Shift+F5 to compile and run the report.
    You will now see the generated report in preview mode.

See Also

Report Object
How to: Create a Word Layout Report