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

Defining a Report Dataset

You use report object in the AL Language development environment to define the data model, or dataset, of a report. The dataset determines the data that is extracted or calculated from the Dynamics 365 for Finance and Operations, Business edition and Dynamics NAV database tables that can be used in a report. For more information, see Report Object.

You build the report dataset from data items and columns. A data item is a table. A column can be:

  • A field in a table

  • A variable

  • An expression

  • A text constant

Typically, data items and columns correspond to fields in a table. When the report is run, each data item is iterated for all records in the underlying table. Filters are applied and the dataset is created. When a report is based on more than one table, you must set relations between the data items so that you can retrieve and organize the data.

Snippet support

Typing the shortcut treport will create the basic layout for a report object when using the AL Extension in Visual Studio Code.


The following example adds the Customer table as the data item and the CustomerName and CompanyName as fields of a column to the report. For more information on creating a report, see How to: Create a Report.

        dataitem(Customer; Customer)
            column(CustomerName; CustomerName)
            column(CompanyName; CompanyName)

See Also

Report Object
Reports Overview
Report Design Overview