Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Version: Available or changed with runtime version 18.0.
Sets the layout with the Theme subtype that should be used by this Body layout.
Applies to
- Report Layout
APPLIES TO: Business Central 2026 release wave 2 and later
Remarks
Set ThemePart on a Word layout that has SubType = Body. The value is the name of another layout in the same rendering section of the report. The referenced layout must be a Word layout that has SubType = Theme, and it must point to a .dotx template file.
A theme part supplies the fonts, colors, and styles that the Body layout uses when the report renders. Keep your brand formatting in one template, and reference that template from every Body layout that needs it.
If ThemePart references a layout that has another type or subtype, the compiler reports an error.
To use one theme part across all Body layouts in a report, set the DefaultThemePart property on the report instead.
Example
The following example declares a Body layout that gets its fonts, colors, and styles from a separate theme template.
report 50101 "Customer List Themed"
{
ApplicationArea = All;
UsageCategory = ReportsAndAnalysis;
DefaultRenderingLayout = ThemedBody;
dataset
{
dataitem(Customer; Customer)
{
column(Name; Name)
{
}
}
}
rendering
{
layout(ThemedBody)
{
Type = Word;
SubType = Body;
ThemePart = CorporateTheme;
LayoutFile = 'Reports/Layouts/ThemedBody.docx';
}
layout(CorporateTheme)
{
Type = Word;
SubType = Theme;
LayoutFile = 'Reports/Layouts/CorporateTheme.dotx';
}
}
}
Related information
Declare report layouts in AL
DefaultHeaderFooterPart property
DefaultThemePart property
HeaderFooterPart property
DefaultRenderingLayout property
Defining multiple report layouts
Getting started with AL
Developing extensions