topic hubAL Developmentofficial - Microsoftunreviewed - model text not yet checked

Developing reports

Developing reports in AL for Business Central covers report objects, datasets, layouts (Word, Excel, RDLC/RDL), request pages, extensions, substitution, obsoleting, telemetry, performance, troubleshooting and testing. It answers how to design, extend, format, expose, run and diagnose reports.

Path: Development > Programming in the AL language > Developing reports · tier official · system development · narrative unreviewed (model text not yet checked)

Overview

This section is the main reference for building reports in AL. It starts with the report object and the Reports overview, then moves to the dataset (data items and columns) and the layouts that present the data: Word, Excel and RDL. Request pages let users set options and filters before a report runs.

Subtopics go deeper. They cover formatting report data, report layouts, discoverability, triggers and events, and how users run, print and schedule reports. An AL language reference subtopic is also included.

For changing existing reports, there are pages on report extension objects, a report extension example, and report substitution. Operations pages cover telemetry, performance, troubleshooting, obsoleting reports and testing datasets with AL test codeunits. Start with the Reports overview and Report Design Overview. Then follow the walkthrough on designing a report from multiple tables.

Key points

  • A report dataset is built from data items (tables) and columns (fields, variables, expressions), with table relations and optional captions.
  • Layouts can be Excel, Word or RDL, and a report can have multiple layouts. The Report layouts subtopic has 22 pages on them.
  • Report extension objects add columns, data items, triggers, request page elements and layouts to existing reports. The extensible property is involved.
  • Report substitution uses the OnAfterSubstituteReport event in Codeunit 44 ReportManagement. From 2021 release wave 1, report extensions are an alternative.
  • Request pages use RequestFilterFields and SaveValues to let users set filters and saved options.
  • Obsoleting reports uses ObsoleteReason, ObsoleteTag and ObsoleteState. Layout-level obsolescence applies from 2025 release wave 1.
  • Report telemetry tracks successful, failed and canceled runs, including dataset generation time, rendering time and SQL execution. It supports performance analysis and troubleshooting.
  • Report datasets can be tested with AL test codeunits using the Library - Report Dataset codeunit and RunReportAndLoad, without server file system access.

Subtopics

More Learn pages

  • Obsoleting reports: Learn how to obsolete Business Central reports.
  • Report dataset: The dataset determines the data extracted to print or display the information from the database.
  • Report Design Overview: Design a report by defining the dataset and designing the layout. Report object is composed of dataset, layout, request page, properties, triggers and code.
  • Report Extension Example: Reports are used to print or display information from a database.
  • Report extension object: The report extension object in AL for Business Central allows you to create an extension of an existing report.
  • Report Generation Telemetry: Learn about the report telemetry in Business Central.
    • Report telemetry captures successful generation (RT0006), failures, cancellations (RT0007), and commits during cancellation (RT0011) with performance metrics.
    • Total time minus server execution time equals rendering time. Rendering time is difference between generating dataset and applying layout.
    • Limit: Business Central online cancels reports exceeding timeout threshold or max row limits; on-premises has no default limits but supports ReportTimeout and ReportMaxRows parameters.
    • Dimensions include report ID, name, layout type (Rdlc, Word, Excel, Custom), document format, action (Print, Preview, Save, Schedule, Download), and reporting engine used.
    • Theme layout and header/footer layout dimensions added in version 29.0 indicate layouts applied to report; values empty when not applied.
    • Cancellation reasons include user request, timeout exceeded, maximum rows exceeded, or Word report rendering timeout.
    • Limit: Event must log when report canceled with commit performed before cancellation, indicating potential data inconsistency if report not idempotent.
  • Report object: The report object in AL for Business Central allows to create a new report.
  • Report performance: Provides information for developers to help improve performance for Business Central reports.
  • Reports overview: Use reports to display information from database to structure and summarize information and print documents, such as invoices.
  • Substituting Reports in Business Central: Learn how to substitute one report for another in Business Central by handling the OnAfterSubstituteReport event, and how report extensions compare.
  • Test Report Datasets with AL Test Codeunits: Test report datasets with AL test codeunits, load report output into memory, and verify values with the Library - Report Dataset codeunit.
  • Troubleshooting reports: Learn about how to troubleshoot Business Central reports
  • Using request pages with reports: Introducing how to work with request pages with Business Central reports.
  • Walkthrough - Designing a report from multiple tables: This walkthrough shows you how to design a report from multiple tables.

Key facts from Microsoft Learn (CC BY 4.0), in our own words (D106); open the page for the full text.

Videos, posts and code changes

Linked by a Haiku matcher with a grounding quote from the item’s summary (link/topics.ts); machine-generated.

Business Central pages and reports

The pages, reports and queries this hub’s Learn pages name (ms.search.form, API reference), joined to the code by exact object id (data/index/docs-objects.json); a page shows the table it runs on.

Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.

What Learn documents here 8 of 54 Learn pages

Show 32 more