Table of Contents

Managing Report Layouts

The Document Reporting module allows you to create and manage custom report layouts to control the appearance of your business documents. This section explains how to work with report layouts to create professional-looking documents.

Understanding Report Layouts

In Business Central, report layouts determine how a report looks when viewed, printed, or saved. The Document Reporting module uses the standard Business Central report layout system, with some additional features for managing layouts through document report definitions.

There are two main types of report layouts:

  • RDLC Layout: Uses Report Definition Language Client-side, which offers precise control over layout and formatting.
  • Word Layout: Uses Microsoft Word documents as templates, which are easier to create and modify.

For most business documents, Word layouts are recommended as they are easier to customize and maintain.

Creating a New Word Layout

You can create a new Word layout for a report using the following steps:

To create a new Word layout:

  1. Choose the Lightbulb that opens the Tell Me feature icon, enter Report Layouts, and then choose the related link.
  2. On the Report Layout Selection page, select the New action.
  3. Fill in the following fields:
    • Report ID: Select the report for which you want to create a layout.
    • Name: Enter a descriptive name for the layout.
    • Description: Provide additional details about the layout.
    • Format: Select Word.
  4. Choose OK to create the layout.
  5. You'll be prompted to either export an existing layout as a starting point or create a new blank layout.
    • If you choose Export Layout, the system will export an existing layout to a Word document that you can modify.
    • If you choose Create Layout, the system will create a new blank Word document with the report dataset.
  6. Save the exported or created file to your computer.

Modifying a Word Layout

After creating a Word layout, you can modify it using Microsoft Word:

To modify a Word layout:

  1. Open the Word document that contains your report layout.
  2. Ensure the Developer tab is visible in the Word ribbon (if not, enable it in Word options).
  3. Use the XML Mapping Pane to access the data fields available in the report:
    • On the Developer tab, choose XML Mapping Pane.
    • In the Custom XML Part dropdown list, select the custom XML part for the Business Central report, which typically follows the format: urn:microsoft-dynamics-nav/reports/<report_name>/<ID>.
  4. From the XML Mapping Pane, you can add fields to your document:
    • To add a label or data field: Place your cursor where you want to add the field, right-click the field in the XML Mapping Pane, choose Insert Content Control, and then choose Plain Text.
    • To add repeating rows (for tables): Select a table row, right-click the data item containing the fields you want to repeat, choose Insert Content Control, select Repeating, and then add fields to each cell.
    • To add an image field: Place your cursor where you want the image, right-click the image field in the XML Mapping Pane, choose Insert Content Control, and then choose Picture.
  5. Format the document as desired using standard Word formatting tools.
  6. Save the Word document when you're finished.

For more detailed instructions on working with Word layouts, see Work with Word Layouts.

Importing a Modified Layout

After modifying a Word layout, you need to import it back into Business Central:

To import a modified layout:

  1. Choose the Lightbulb that opens the Tell Me feature icon, enter Report Layouts, and then choose the related link.
  2. Find and select the layout you want to update.
  3. Choose the Import Layout action.
  4. Locate and select the Word document you've modified.
  5. Choose Open to import the layout.

Setting a Layout as the Default for a Report

You can set a specific layout as the default for a report:

To set a default layout:

  1. Choose the Lightbulb that opens the Tell Me feature icon, enter Report Layout Selection, and then choose the related link.
  2. On the Report Layout Selection page, select the report for which you want to set the default layout.
  3. In the Selected Layout field, select the layout you want to use as the default.

Using Custom Layouts in Document Reports

After creating and importing your custom layouts, you can use them in your document reports:

To use a custom layout in a document report:

  1. Choose the Lightbulb that opens the Tell Me feature icon, enter Document Reports, and then choose the related link.
  2. Find and select the document report you want to modify, or create a new one.
  3. In the Report Layout field, select your custom layout.

Now, when this document report is used to generate documents, it will use your custom layout.

Creating Letterheads

The Document Reporting module also supports adding letterheads to your reports. Letterheads can be added as background elements or appended to the document:

To set up a letterhead:

  1. Choose the Lightbulb that opens the Tell Me feature icon, enter Letterheads, and then choose the related link.
  2. On the Letterhead List page, choose the New action.
  3. Fill in the following fields:
    • Code: Enter a unique identifier for the letterhead.
    • Description: Enter a descriptive name for the letterhead.
    • File Name: Browse to select the letterhead file (typically a PDF).

To apply a letterhead to a document report:

  1. Open the document report you want to modify.
  2. In the Background Letterhead Code field, select a letterhead to use as the background for the document.
  3. In the Append Letterhead Code field, select a letterhead to append to the document.

When the document is generated, the specified letterheads will be applied to the document.

Best Practices for Report Layouts

  • Maintain consistent styling across all your document layouts for a professional appearance.
  • Test your layouts with various data scenarios to ensure they handle all possible content correctly.
  • Use company branding elements consistently across all documents.
  • Consider language requirements if your company operates in multiple countries/regions.
  • Optimize layouts for printing if documents will be physically printed.
  • Keep a backup of all your custom layouts for disaster recovery.
  • Document your customizations for future reference and maintenance.

For more information about working with report layouts in Business Central, see Managing Report Layouts.