Skip to content

Creating and Copying Layouts

Attention

The features on the Custom Report Layouts page are all marked as deprecated in the Document Creator extension, from version 2.0 onwards / for the Microsoft Dynamics 365 Business Central 2022 release wave 2 (April 1st, 2022; Version 20.0). The feature has been replaced by the features on the Report Layouts page.

Creating a New Layout

A Dynamics 365 Business Central report is made up of the following two components:

  • Report Object: A report object defines the report dataset (i.e., based on the report schema, which include the dataitems, fields/columns and parameters) and request page. Its definition is found in the code of a Dynamics 365 Business Central (AL) extension.
  • Layout: A layout defines how the report dataset should be presented when printed or exported to a file. You can use a report designer to edit the layout of a report.

To create a new report layout, you first need to have a report object that the layout will target. You can use one of the report objects from the Microsoft Base Application, use a report object from our W1 Report Templates extension (see Templates), or from any other extension.

If you have a report object, then you can create a new Document Creator layout for the report on the Custom Report Layouts page as follows:

  1. Invoke the New... action.

    new-action

  2. Enter/Select the Report ID of the target report object.

  3. Enable Insert Document Creator Layout.
  4. Select OK.

The figure below shows the inputs on the Insert Built-In Layout page to create a new Document Creator layout for report 72102 Sales – Invoice:

new-layout-dialog

A new record will have been created with "Document Creator Layout" as the default description. You can change this description to a more descriptive name of your liking.

new-layout-record

Copying a Layout

To copy a layout from an existing Document Creator custom report layout record to a new record on the Custom Report Layouts page, follow these steps:

  1. Select a custom report layout record from which to copy the layout.
  2. Invoke the Copy action
  3. By default the New Layout Description will be set to "Copy of <Original Description>". You can freely change this description. (Optional)
  4. You can also change the target report object for the new layout if you enable the Change Dataset option. If this option is enabled, you can enter/select the Report ID of the new target report object. (Optional)
  5. Select OK.

copy-layout-dialog

A new record will have been created containing a copy of the layout of the earlier selected record.

Caution

If you enable the Change Dataset option and change the target report object, then please take into account that the schema of the report objects might be different. Therefore, the layout may not work directly, which means you will need to edit it first to make sure it matches the new schema.


Last update: March 24, 2022