Create and modify a custom report or document layout

Completed

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

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'll 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.

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 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.

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 will depend 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 document 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 are 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 two ways to create a new layout from an existing layout. One way is by saving the existing layout to a copy. The other way is to export the existing layout.

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

  1. Choose the search 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.

  2. Select the layout that you want a copy of for your new layout, then choose the Edit Info action. If you selected an extension layout, you're prompted whether you want to edit a copy. To continue, select Yes. To help you find the layout, use the Search box, Filter pane, and columns sorting.

  3. Change the Layout Name.

  4. Turn the Save Changes to Copy switch to On, then select OK. The new layout shows in the Report Layouts page.

  5. If you want to make changes to the new layout, see Modify an existing layout.

Importing/Exporting

  1. Choose the search 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.

  2. Select the layout that you want a copy of for your new layout, then choose the Export Layout action. The layout file is downloaded to your device. To help you find the layout, use the Search box, Filter pane, and columns sorting.

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

  4. Make changes to the file and save it.

  5. Back on the Report Layouts, select the New Layout action.

  6. Fill in the following fields:

    • Report ID: Set to the ID assigned to the report

    • Layout Name: Type a brief description name for the layout to help you easily identify it.

    • Description: Type more detailed information the layout.

  7. Format Options Set this field to match the type of the layout, like Word, Excel, or RDLC.

  8. Select OK, then do one of the following steps to upload the layout file for the report:

    1. Drag the file from file explorer on your device to the dialog box.

    2. Select the click here to browse link, find the file, then select the Open button.

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

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

Modify a layout

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

  1. Choose the search icon, enter Report Layouts, and then choose the related link.

    1. The Report Layouts page appears and lists all the layouts currently available for all reports.
  2. Select the layout that you want to modify, then choose the Export Layout action.

    1. The layout file is downloaded to your device.
  3. To help you find the layout, use the Search box, Filter pane, and columns sorting.

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

  5. Make changes to the file and save it.

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

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

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

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

  10. 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 search icon, enter Report Layouts, and then choose the related link.

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

  3. 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.

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

  7. 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 search icon, enter Report Layouts, and then choose the related link.

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

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

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

  5. Change the Layout Name, then select OK.

More information

For more information, see: