When I set out to build custom reports in Business Central, I considered Microsoft Word as the layout engine before landing on Microsoft Report Builder. The interface feels dated, but once I got past that, it turned out to be the more capable tool for the job.

Building a Sales Quote report

The foundation is a report object with a hierarchical dataset. Here is a Sales Quote example, with the quote header at the top level and the lines nested under it:

report 60100 "Sales Quote"
{
    UsageCategory = None;
    ApplicationArea = Basic, Suite;
    Caption = 'Sales Quote';
    DefaultLayout = RDLC;
    RDLCLayout = './src/SalesQuote.Report.rdl';
    PreviewMode = PrintLayout;

    dataset
    {
        dataitem(Header; "Sales Header")
        {
            column(No; "No.")
            {
            }

            dataitem(Line; "Sales Line")
            {
                DataItemLink = "Document No." = field("No.");
                DataItemLinkReference = Header;
                DataItemTableView = sorting("Document No.", "Line No.");

                column(LineNo; "Line No.")
                {
                }
                column(Description; Description)
                {
                }
                column(Quantity; this.FormattedQuantity)
                {
                }
                column(Unit; "Unit of Measure Code")
                {
                }
                column(UnitPrice; this.FormattedUnitPrice)
                {
                }
                column(LineAmount; this.FormattedLineAmount)
                {
                }

                trigger OnAfterGetRecord()
                begin
                    this.FormatDocument.SetSalesLine(Line, this.FormattedQuantity, this.FormattedUnitPrice, this.FormattedVATPct, this.FormattedLineAmount);
                end;
            }
        }
    }

    var
        FormatDocument: Codeunit "Format Document";
        FormattedQuantity: Text;
        FormattedUnitPrice: Text;
        FormattedVATPct: Text;
        FormattedLineAmount: Text;
}

The Microsoft Format Document codeunit handles proper formatting of currency and quantity values, so the layout receives ready-to-print text instead of raw decimals.

Working with Microsoft Report Builder

After publishing the extension, Business Central generates a basic RDL file containing the available dataset fields. When you open the tool it looks like this:

From there the design workflow is:

  1. Add header elements: textfields for titles and data placeholders.
  2. Map data fields: drag dataset columns from the left panel and assign expressions via the dropdown menus.
  3. Create tables: use the insert panel to draw tables for line items, then assign dataset fields through the interface.
  4. Test, then test again. This part deserves more time than you expect.

Dragging dataset fields from the left panel into the layout placeholders looks like this:

Dragging the No. dataset field into a header placeholder in Report Builder

For the quote lines, draw a table from the insert panel and assign the dataset fields to its columns:

Assigning dataset fields to the Sales Quote Lines table

Report Builder is no Figma. But once you understand its workflow, the capabilities underneath are solid.

Substituting built-in reports

To give users the improved layout without cluttering the interface with a second report, substitute the standard one. An event subscriber intercepts calls to the built-in Sales Quote report (ID 1304) and redirects them:

codeunit 60200 Reports
{
    [EventSubscriber(ObjectType::Codeunit, Codeunit::ReportManagement, 'OnAfterSubstituteReport', '', false, false)]
    local procedure OnAfterSubstituteReport(ReportId: Integer; var NewReportId: Integer)
    begin
        if ReportId = 1304 then
            NewReportId := Report::"Sales Quote";
    end;
}

Users keep their familiar workflow, and every print of a Sales Quote now uses the custom layout.

Conclusion

Microsoft Report Builder may feel dated compared to modern design tools, but once you understand its workflow, it provides good capabilities for creating professional Business Central reports.