編輯

共用方式為


Get started creating report layouts

Business Central comes with many built-in layouts that you can use on your reports. Other layouts may have been added as part of other extensions. But it's also possible to create your own reports either from scratch or based on an existing layout.

Important

You can also use report layouts to add content to email messages. For example, report layouts can save time and help ensure consistency by reusing the same content when you communicate with your customers. To use custom report layouts with email, the file type for the layout must be Word. You cannot use the RDLC file type. Learn more in Set Up Reusable Email Texts and Layouts.

Overview

When working with report layouts, it helps to think of the layout as a file that's imported and assigned to a report. Regardless of the layout type, how you manage layouts in Business Central is basically the same. Usually, you work from the Report Layouts page. The main difference is how you design the layout, which is done by using the application software that the layout's built on, like Word, Excel, or SQL Server Report Builder.

With this concept in mind, there are basically three or four tasks involved in setting up a layout on a report:

  1. Decide on the layout type.
  2. Export a copy of an existing layout to use 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't modify or replace an extension layout, which is a layout that originates from an extension. You can only modify or replace user-defined layouts. On the Report Layouts page, you can tell whether the layout is an extension layout or user-defined layout by looking at Extension column. An extension layout will show information about the source extension in the column. The Extension column will be empty for a user-defined layout.

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

Get started

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

What do you want to do? Learn more
Figure out what's the best layout type to use for my situation Decide what type of layout you want
Create a new layout for a report that's based on a copy an existing layout or create one from scratch Create a new layout
Make changes to an existing layout that's used on a report Modify a layout
I have a new version of a layout file for a report. I want to replace the existing layout file. Replace a layout
Switch the current layout used by a report to another layout Setting the Layout Used by a Report
Change the name and description of a layout Rename a layout

Decide what type of layout you want

The first thing when creating a layout is to decide which layout type you want. You can choose either Word, Excel, or RDLC. The layout type depends on how you want the generated report to look. Plus, it depends on your knowledge of application software for creating the layouts, like Word, Excel, and SQL Server Report Builder.

  • Excel layouts are generally the easiest to create and modify because the features for summarizing data, adding graphics, and styling, are common Excel features.

  • Not all reports and documents have a dataset that is optimized for use with an Excel layout. For example, aggregations and complex calculations work best with RDLC or Word layouts. The same is true for documents.

  • If you're only making style changes like font type, size and colors, a Word layout is also a good choice.

  • Adding data fields or rearranging data fields in Word or RDLC is more advanced than with Excel.

  • Word and RDLC layouts are good to use for reports that will eventually be printed.

  • The general design concepts for Word and RDLC layouts are similar. However, each type has certain design features that affect how the generated report appears in Business Central. The same report might look different when using the Word layout compared to the RDLC layout.

Create a new layout

There are different ways to create a new layout. The easiest ways involve using a copy of an existing layout, which you can do by either saving an existing layout directly as a copy or exporting it and then importing it to a new layout. Another, more advanced way, is to create a layout from scratch using a blank.

Copying is a quick way to create a new layout that's the same as an existing layout. Once you have the copy, you can make modifications by exporting the layout.

  1. Choose the Lightbulb that opens the Tell Me feature 0. icon, enter Report Layouts, and then choose the related link.

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

  1. Select the layout that you want a copy of for your new layout, then choose the Edit Info action.

    If you select an extension layout, you're prompted whether you want to edit a copy. To continue, select Yes.

    Tip

    To help you find the layout, use the Search box, Filter pane, and columns sorting.

  2. Change the Layout Name.

  3. Turn the Save Changes to Copy switch to On, then select OK.

    The new layout shows in the Report Layouts page.

  4. If you want to make changes to the new layout, refer to Modify an existing layout.

Modify a layout

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

  1. Choose the Lightbulb that opens the Tell Me feature 0. icon, enter Report Layouts, and then choose the related link.

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

  1. Select the layout that you want to modify, then choose the Export Layout action.

    The layout file is downloaded to your device.

    Tip

    To help you find the layout, use the Search box, Filter pane, and columns sorting.

  2. Open the layout file in the appropriate application, like Word (for a .docx file) or Excel (for an .xlsx file).

    Learn more in:

    Make changes to the file and save it.

  3. Back on the Report Layouts page, select the existing layout, then select the Replace Layout action.

  4. Select OK > Choose to open file explorer on your device.

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

    The selected file is uploaded to the layout, and you return to the Report Layouts page.

  6. If you want to see how the report looks with the new layout, select the layout in the list, then select Run Report.

Replace a layout

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

  1. Choose the Lightbulb that opens the Tell Me feature 0. icon, enter Report Layouts, and then choose the related link.

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

  1. Select the existing layout, then select the Replace Layout action.

  2. Select OK > Choose to open file explorer on your device.

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

    The selected file is uploaded to the layout, and you return to the Report Layouts page.

  4. If you want to see how the report looks with the new layout, select the layout in the list, 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. Choose the Lightbulb that opens the Tell Me feature 0. icon, enter Report Layouts, and then choose the related link.

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

  1. Select the layout that you want to rename, then choose the Edit Info action.

    Tip

    To help you find the layout, use the Search box, Filter pane, and columns sorting.

  2. Change the Layout Name, then select OK.

Managing Report Layouts
Working with Word Layouts
Working with Excel Layouts
Working with Reports, Batch Jobs, and XMLports
Working with Business Central

Find free e-learning modules for Business Central here