Simple Object Designer Documentation
Index

Creating and Managing Layouts

This page explains how to create report layouts, work with the layout structure in the Report Layout Designer, and manage layouts over their lifetime.

The Report Layout List

Open Report Layouts from the main menu (or search for "Simple Object Designer Report Layouts"). The list shows all layouts created with the designer.

Columns

Column Description
Report ID The report the layout belongs to
Report Name Name of the report
Name Layout name
Description Layout description
Include in App Whether the layout is included in your generated extension

Actions

Action Purpose
New Create a new layout for a report
Edit Report Open the layout in the Report Layout Designer
Test Print Run the report with this layout and live data
Duplicate Copy the selected layout under a new name
Export Download the layout as a JSON file
Import Upload a layout JSON file (creates a new layout, or replaces an existing layout with the same name)
Delete Remove the layout
Welcome Show the welcome page again

Creating a New Layout

  1. Click New on the layout list
  2. Enter the Report ID (or pick from the lookup) — the report name fills in automatically
  3. Enter a Layout Name (required, must be unique for the report)
  4. Optionally enter a Description
  5. Click OK

The layout is created as an empty custom report layout, ready to design.

Learning a Report

Before you can design, Simple Object Designer must know which data items and columns the report exposes, along with example values. This is called learning the report.

When you open the designer for a report that has not been learned yet, you are asked:

"Looks like we haven't learned what elements this report has, run the learning process now?"

Answer Yes: the report runs once (you may be asked for filters on its request page) and its dataset structure and example values are captured. You can re-run this at any time with the Learn Report action — do so after adding new fields to the report's dataset with SOD.

The Report Layout Designer Page

Open a layout with Edit Report. The Report Layout Designer page shows the layout as a list of sections — the horizontal bands that make up the report.

Section Columns

Column Description
DataItem The report data item the section is bound to
Function The section's role (see below)
PrintOnPage On which pages the section prints
PageBreakElement Whether the section forces a page break
ColumnCount Number of columns available on the section's data item (click to view them)

Section Functions

Function Prints
Header Before the data item's rows (e.g. the document header)
Normal Once per row of the data item — the repeating body band (called "Line" in the visual editor)
Footer After the data item's rows
GroupHeader At the start of each group (defined by group break fields)
GroupFooter At the end of each group
TransportHeader At the top of continuation pages (e.g. "carried forward")
TransportFooter At the bottom of pages that continue (e.g. "to be continued")
PageFooter At the bottom of every page
DataLink Nothing — links a data item into scope so its fields can be referenced

A typical document layout has exactly one Normal (body) section, on the innermost repeating data item (for example, the invoice lines).

  • Print on — All, First, Last, All But First, All But Last
  • Page Break — force a new page before/for the section (for example, on the document header when printing a batch of documents)
  • Print this section if — a condition (field, operator, compare value) that decides whether the section prints. Operators: =, <>, <, >, <=, >=, Contains, Is Empty, Is Not Empty

Designer Actions

Action Purpose
Edit Report Layout Open the visual canvas editor for the layout
Edit Page Background Open the Full Page Canvas (backgrounds, watermarks, borders, stationery)
Test Print Run the report with this layout
Fonts / Images Manage fonts and images scoped to this layout
Move up / Move down Reorder sections
Sorting Choose the columns a section's data item is sorted by, with direction and data type
Group Break Fields Choose the columns that define group boundaries
Total Fields Choose numeric columns to accumulate as running totals
Edit Initialization Code / Edit Element Triggers / Edit Layout Code / Edit Page Background Code Advanced: edit the layout's code directly
Settings Page setup and PDF options
Learn Report Re-run the dataset learning process

The Group / Sort / Total Fields FactBox shows the current field configuration at a glance.

Sorting, Grouping, and Totals

Select a section, then use the Fields actions:

  • Sorting — add the columns to sort the data item by. Each has a Direction (ascending/descending) and a Sorting Type (text, numbers, dates, times).
  • Group Break Fields — the columns whose value changes start a new group. Combine with GroupHeader/GroupFooter sections.
  • Total Fields — numeric columns to accumulate. Each total becomes available in the layout as [<DataItem><Field>GroupTotal] (reset per group) and [_TransportTotal] (running page total for transport sections).

Use Select Columns to tick several columns at once, and Move Up/Move Down to order them.

Fonts and Images

Each layout has its own pool of fonts and images:

  • Fonts — upload TrueType (.ttf) font files. The font name is taken from the file name. When referencing a font name that contains spaces in layout code, quote it: "My Font".
  • Images — upload JPEG (.jpg/.jpeg) or PNG (.png) images (logos, stamps, signatures) and reference them by name from image elements.

Fonts and images can also be inherited from a report set — those are managed on the report set and cannot be deleted on the individual layout (see Report Sets).

Layout Settings

The Settings action opens the Report Layout Settings page:

Page Setup

Setting Description
Unit of measure mm, cm, or in — display only; values are always stored in mm
Page Width / Page Height Paper size; defaults to A4 portrait (210 × 297 mm)
Margins Top, Right, Bottom, Left

PDF Metadata

Author, Subject, and Keywords written into the PDF document properties.

PDF Protection

Produce encrypted PDFs:

Setting Description
Enable Protection Turn PDF encryption on
User Password Password required to open the document
Owner Password Password required to change permissions
Allow Print / Allow Modify / Allow Copy / Allow Annotate Permissions granted to readers

Running a Report with Your Layout

There are two ways:

  1. Test Print — from the layout list, the designer, or the editors. This temporarily selects your layout, runs the report (showing its request page so you can set filters), and produces the PDF. Any unsaved canvas changes are saved first.
  2. Standard layout selection — because your layout is a normal custom report layout, users can select it for the report in Business Central's standard report layout selection, after which every run of the report uses it.

Include in App

Turn on Include in App for a layout to register it as part of the report's customization in Simple Object Designer, so the layout is included when you publish your generated extension. Turning the toggle off removes the layout from the app again (the layout itself is kept).

Moving Layouts Between Environments

  • Export downloads the complete layout — settings, all sections, and the layout's fonts and images — as one JSON file
  • Import uploads such a file into another company or environment; a layout with the same name on the same report is replaced