Edit

Get started creating report layouts

Business Central includes many built-in layouts that you can use on your reports. Other layouts might be added as part of extensions. In addition, you can create your own report layouts, either from scratch or based on an existing layout.

Note

You can also use report layouts to add content to email messages, which saves time and helps ensure consistency when you communicate with your customers. Only custom report layouts of the Word type can be used with email. You can't use RDLC layouts with email. Learn more in Set up reusable email texts and layouts.

Overview of report layouts

It can be helpful to think of a report layout as a file that is imported and assigned to a report. You manage all layouts in Business Central in basically the same way, regardless of the layout type. You mainly work from the Report Layouts page. The layouts differ mainly in the way that you design them. Each layout is designed by using the software that the layout is built on, such as Word, Excel, or SQL Server Report Builder.

Word layouts can also have a subtype, which defines the layout's role. A stand-alone layout uses the Default subtype. A layout with the Body subtype contains report-specific content that can be combined with a reusable theme and header/footer when the report runs. The theme and header/footer are separate reusable parts that administrators manage on their own. Learn more in Set up reusable themes and header/footer layouts.

The process of setting up a layout for a report involves three or four basic tasks.

  1. Decide which layout type to use.
  2. Export a copy of an existing layout so that you can use it as a starting point.
  3. Make changes to the layout file in the appropriate application.
  4. Add the new layout file to the report.

Important

You can modify or replace only user-defined layouts. You can't modify or replace extension layouts, which are layouts that originate from an extension. On the Report Layouts page, you can tell whether a layout is a user-defined layout or an extension layout by looking in the Extension column. For an extension layout, the Extension column shows information about the source extension. For a user-defined layout, the Extension column is blank.

Learn more about the difference between extension layouts and user-defined layouts in Layout sources.

Get started

Depending on your situation, the actual tasks vary. Use the following table to get started.

What do you want to do? Learn more
Figure out the best layout type to use for my situation. Decide what type of layout you want
Create a new layout for a report, either from scratch or based on a copy of an existing layout. Create a new layout
Make changes to the layout that a report uses. Modify a layout
Replace the current layout file that a report uses with a new version of the layout file. Replace a layout
Change the current layout that a report uses to another layout. Set the layout used by a report
Apply a reusable theme and header/footer to Word body layouts. Set up reusable themes and header/footer layouts
Change the name and description of a layout. Rename a layout
Change whether a layout is available for selection. Manage layout status
Mark a layout as obsolete Mark a layout as obsolete
Validate a layout. Validate a layout
View information about a layout. Get information about a layout
Delete a user-defined layout. Delete a layout

Decide what type of layout you want

The first task when you create a layout is to decide which layout type you want. You can choose among the Word, Excel, and RDLC layout types. Your choice depends on how you want the generated report to look. It also depends on your knowledge of the software that is used to create the layout, such as Word, Excel, and SQL Server Report Builder.

  • Excel layouts are generally the easiest to create and modify because summarizing data, adding graphics, and styling are common Excel features. However, not all reports have datasets optimized for Excel layouts. Aggregations and complex calculations work best with RDLC or Word layouts. Documents that use aggregations or complex calculations also work best with RDLC or Word layouts.
  • If you're making only style changes, such as changes to the font type, size, and colors, a Word layout is a good choice.
  • The capabilities for adding and rearranging data fields are more advanced in Word and RDLC layouts than in Excel layouts.
  • Word and RDLC layouts are good choices for printable reports.
  • The design concepts for Word and RDLC layouts are similar, but each has specific features that affect the report's appearance in Business Central. The same report might look different depending on whether a Word or RDLC layout is used.

If you want to apply reusable themes and header or footer layouts, create a Word layout and set its Subtype to Body. Use Default for a stand-alone Word layout that renders without reusable parts. Learn more about setting the subtype in Create a new layout.

Note

The Subtype field and composite layout options are available when the Document Report Experience feature is enabled on the Feature Management page. Learn more in Enabling new and upcoming features ahead of time.

Create a new layout

There are different methods for creating a new layout. The easiest methods involve using a copy of an existing layout. For these methods, you can either save the existing layout directly as a copy, or export it and then import it into a new layout. Another, more advanced method is to create a layout from scratch by using a blank layout.

Copying an existing layout lets you quickly create a new, identical layout that you can customize.

  1. Select Search (Alt+Q) in the upper-right corner, enter Report Layouts, and then choose the related link.

    The Report Layouts page appears and lists all the layouts currently available for all reports.

    The Report Layouts page lists all layouts for all reports.

  2. Select the layout that you want to copy for the new layout, and then select the Edit Info action.

    If you select an extension layout, you're asked whether you want to edit a copy of it. Select Yes.

    Tip

    To find the layout that you want, use the search field, the filter pane, and column sorting.

  3. In the Layout Name field, enter a new name.

  4. Turn on the Save Changes to Copy toggle, if it isn't already on.

  5. Select OK.

    The new layout appears on the Report Layouts page.

If needed, you can change the settings in your new layout. To learn more, go to Modify a layout.

Modify a layout

Follow these steps to modify an existing user-defined layout.

  1. Select Search (Alt+Q) in the upper-right corner, enter Report Layouts, and then choose the related link.

    The Report Layouts page appears and lists all the layouts currently available for all reports.

  2. Select the layout that you want to modify, and then select the Export Layout action.

    The layout file downloads to your device.

    Tip

    To find the layout that you want, use the search field, the filter pane, and column sorting.

  3. Open the layout file in the appropriate application, such as Word (for a .docx file) or Excel (for an .xlsx file).

    Learn more in the following articles:

  4. Make the changes you want to the file—such as adding fields, adjusting tables, or updating formatting—and then save it.

  5. On the Report Layouts page, select the existing layout, and then select the Replace Layout action.

  6. Select OK and then Choose to open File Explorer on your device.

  7. Find and select the Excel file, and then select Open.

    The selected file is uploaded to the layout, and you're returned to the Report Layouts page.

  8. To view how the report looks with the new layout, select the layout in the list, and then select Run Report.

Replace a layout

Follow these steps to replace the existing user-defined layout file with a new file.

  1. Select Search (Alt+Q) in the upper-right corner, enter Report Layouts, and then choose the related link.

    The Report Layouts page appears and lists all the layouts currently available for all reports.

  2. Select the existing layout, and then select the Replace Layout action.

  3. Select OK and then Choose to open File Explorer on your device.

  4. Find and select the Excel file, and then select Open.

    The selected file is uploaded to the layout, and you're returned to the Report Layouts page.

  5. To view how the report looks with the new layout, select the layout in the list, and then select Run Report.

Rename a layout

Follow these steps if you want to change the name and description of a user-defined layout.

  1. Select Search (Alt+Q) in the upper-right corner, enter Report Layouts, and then choose the related link.

    The Report Layouts page appears and lists all the layouts currently available for all reports.

  2. Select the layout that you want to rename, and then select the Edit Info action.

    Tip

    To find the layout that you want, use the search field, the filter pane, and column sorting.

  3. In the Layout Name, enter a new name.

  4. Select OK.

Validate a layout

Validate a user-defined layout to check for problems and view the results. Follow these steps to validate a layout.

  1. Select Search (Alt+Q) in the upper-right corner, enter Report Layouts, and then choose the related link.

    The Report Layouts page appears and lists all the layouts currently available for all reports.

  2. Select the layout you want to validate, and then select the Validate action.

    Tip

    To find a layout, use the Search field, Filter pane, or column sorting.

  3. A dialog opens to show the validation results.

Manage layout status

The status controls whether a layout is available for selection on report request pages.

Status Use
Draft The layout is being prepared and isn't available for selection.
Pending Approval The layout is ready for review and isn't available for selection.
Approved The layout is available for selection.
Retired The layout is no longer available for selection.
  1. Select Search (Alt+Q) in the upper-right corner, enter Report Layouts, and then choose the related link.The Report Layouts page appears and lists all the layouts currently available for all reports.
  2. Select one or more layouts.
  3. Select Layout > Layout Status, and then select Set Draft, Set Pending Approval, Set Approved, or Set Retired.

When you change the status of an extension-provided layout, Business Central saves your change as an override. The original extension-provided layout stays unchanged. The override applies your new status while keeping the layout that the extension provides.

Get information about a layout

View information about the layout, such as its ID, the associated report, and when it was created and last modified. This information is useful for troubleshooting. Follow these steps to view layout information.

  1. Select Search (Alt+Q) in the upper-right corner, enter Report Layouts, and then choose the related link.

    The Report Layouts page appears and lists all the layouts currently available for all reports.

  2. Select the layout you want to gather information for, and then select the Show layout info action.

    Tip

    To find a layout, use the search field, the filter pane, or column sorting.

  3. In the Layout information dialog, select the text and copy it to share with others.

Delete a layout

To delete a user-defined layout, follow these steps.

  1. Select Search (Alt+Q) in the upper-right corner, enter Report Layouts, and then choose the related link.

    The Report Layouts page appears and lists all the layouts currently available for all reports.

  2. Select the layout that you want to delete, and then select the Delete action.

    Tip

    To find a layout, use the Search field, the Filter pane, or column sorting.

  3. In the Delete layout dialog, select Yes.

Mark a layout as obsolete

A layout can become obsolete for various reasons. For example, the data model might change, making the layout outdated, or a more efficient layout might be introduced, making the current layout redundant. Marking a layout as obsolete signals to others that it might be removed in a later release, so they should use an alternative layout.

To identify which layouts are obsolete, refer to the Obsolete column on the Report Layouts page. You can mark a user-defined layout as obsolete if needed.

  1. Select Search (Alt+Q) in the upper-right corner, enter Report Layouts, and then choose the related link.The Report Layouts page appears and lists all the layouts currently available for all reports.
  2. Select the layout that you want to change, and then select the Edit Info action.
  3. Turn on the Mark layout as obsolete toggle.
  4. Select OK.

Note

Extension layouts are marked as obsolete in AL code using the ObsoleteState property and can't be changed using the Edit Info action.

Report and document layouts overview
Set up reusable themes and header/footer layouts
Design Word layouts with the Business Central add-in
Map data fields with the XML Mapping Pane
Working with Microsoft Excel Layouts
Run and print reports in Business Central
Work with Business Central

Find free e-learning modules for Business Central here