{"title":"Defining multiple report layouts","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/devenv-multiple-report-layouts/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-multiple-report-layouts, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-multiple-report-layouts","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Learn how to define multiple layouts for one report in AL code.","date":"2024-01-20","meta":{"topic":"concept-article"},"outline":[{"level":1,"title":"Defining multiple report layouts","slug":"defining-multiple-report-layouts","at":0,"chars":4934},{"level":2,"title":"Enabling multiple layouts","slug":"enabling-multiple-layouts","at":585,"chars":1350},{"level":2,"title":"Layout definition in AL","slug":"layout-definition-in-al","at":1935,"chars":2247},{"level":2,"title":"Obsoleting layouts","slug":"obsoleting-layouts","at":4182,"chars":435},{"level":2,"title":"Related information","slug":"related-information","at":4617,"chars":317}],"text":"# Defining multiple report layouts\nIn AL, you have the option of defining multiple layouts for one report in code. This means that you can offer multiple versions of a layout for different purposes. Defining multiple layouts applies to both report objects, and report extension objects. The layouts can be of different types, meaning that you can have, for example, a Word layout and an Excel layout for one report, or multiple Excel layouts for one report. This enables creating report extensions that only add layouts to an existing report and packaging it as an extension .al file.\n## Enabling multiple layouts\nTo enable multiple layouts, you must use the rendering section of a report object. Inside the rendering section, you define one or more layout sections. In each of the layout sections, you specify details about the layout file path and name, you provide a properties/devenv-caption-property and a properties/devenv-summary-property which are displayed to the user in the Report Layouts page in Business Central.\nThe default layout can be specified with the properties/devenv-defaultrenderinglayout-property report property. This property can't be set on report extension objects, only on report objects.\n> NOTE\n> If you don't specify a caption, the layout name is displayed to the user.\nIf the extension is translated, the Caption and Summary properties are included in the .xliff file and translated as well. See devenv-work-with-translation-files.\n> TIP\n> Reports using the previous property-based layout specification can be converted to use the rendering section by using a code action. To use this, ensure code that actions are switched on in your AL extension settings and place the cursor on any of the old layout properties to use the action. Layouts of type RDLC, Word, Excel, and Custom can be specified with the new rendering syntax. See AL Language Extension Configuration<devenv-al-extension-configuration>.\n## Layout definition in AL\nThe following example illustrates how the EmpReportExt report extends the `\"Employee - List\"` list by adding four report layouts as options for printing this report. The report extension only adds the layouts, the dataset remains the same as the existing Employee List report.\n```al\nreportextension 50102 EmpReportExt extends \"Employee - List\"\n{\n    rendering\n    {\n        layout(LayoutExcelPivot)\n        {\n\n            Type = Excel;\n            Caption = 'ExcelPivot';\n            Summary = 'Employee list shown in Pivot table in Excel';\n            LayoutFile = 'EmpShownAsPivot.xlsx';\n            // Introduced in version 26 (runtime 15)\n            ExcelLayoutMultipleDataSheets = true;\n        }\n\n        layout(LayoutExcel)\n        {\n            Type = Excel;\n            Caption = 'Excel layout for employee analysis';\n            Summary = 'Employee list sorted by last name in Excel';\n            LayoutFile = 'EmpSortedByLastName.xlsx';\n        }\n\n        layout(LayoutWord)\n        {\n            Type = Word;\n            Caption = 'Word layout for printing the employee list';\n            Summary = 'Employee list sorted by last name. You can edit it with Word';\n            LayoutFile = 'EmpSortedByLastName.docx';\n        }\n\n        layout(LayoutRDLC)\n        {\n            Type = RDLC;\n            Caption = 'Legacy layout for printing the employee list';\n            Summary = 'Legacy layout for employee list (will be removed in a later version)';\n            LayoutFile = 'MyLegacyLayout.rdlc';\n            // Introduced in version 26 (runtime 15)\n            ObsoleteReason = 'This layout is obsolete and will be removed in the v28 release';\n            ObsoleteState = Pending;\n            ObsoleteTag = 'myObsoleteLayoutTag';\n\n        }\n    }\n}\n```\nIf one or more of the layouts don't exist, they're generated when selecting Ctrl+Shift+P, and then choosing AL: Package. The layouts appear in your project in the right pane of Visual Studio Code. The generated reports contain the dataset from the report, and you can modify and model the reports in each of the layout types as you want.\nCreating layouts in Excel, RDL, or Word is further described in the articles shown under #related-information.\n## Obsoleting layouts\n> APPLIES TO: Business Central 2025 release wave 1 (v26) and later.\nMark report layouts as obsolete using the properties/devenv-obsoletereason-property, properties/devenv-obsoletestate-property, and properties/devenv-obsoletetag-property.\nWhen these properties are set, the layout appears as deprecated on the Report Layouts page in the Business Central client.\nSee Obsoleting reports<devenv-reports-obsoletion>.\n## Related information\nAbout report layouts</ui-manage-report-layouts?toc=%2Fdynamics365%2Fbusiness-central%2Fdev-itpro%2Ftoc.json>\nCreating an Excel layout report<devenv-howto-excel-report-layout>\nCreating an RDL layout report<devenv-howto-rdl-report-layout>\nCreating a Word layout report<devenv-howto-report-layout>"}