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 default theme part, defined as a layout with the Theme subtype, that should be used for the Word layouts of this report.
Applies to
- Report
APPLIES TO: Business Central 2026 release wave 2 and later
Remarks
DefaultThemePart sets the theme part for the Word layouts of the report that have SubType = Body. The value is the name of a layout declared in the rendering section of the report, in the same way as the DefaultRenderingLayout property.
The referenced layout must be a Word layout that has SubType = Theme, and it must point to a .dotx template file. If it references a layout that has another type or subtype, the compiler reports an error.
Use this property when all Body Word layouts in the report share the same fonts, colors, and styles. To set the theme for a single layout, use the ThemePart property on that layout.
Example
The following example gives both Body layouts of the report the same theme, without repeating the reference on each layout.
report 50103 "Customer List Branded"
{
ApplicationArea = All;
UsageCategory = ReportsAndAnalysis;
DefaultRenderingLayout = ShortBody;
DefaultThemePart = CorporateTheme;
dataset
{
dataitem(Customer; Customer)
{
column(Name; Name)
{
}
}
}
rendering
{
layout(ShortBody)
{
Type = Word;
SubType = Body;
LayoutFile = 'Reports/Layouts/ShortBody.docx';
}
layout(DetailedBody)
{
Type = Word;
SubType = Body;
LayoutFile = 'Reports/Layouts/DetailedBody.docx';
}
layout(CorporateTheme)
{
Type = Word;
SubType = Theme;
LayoutFile = 'Reports/Layouts/CorporateTheme.dotx';
}
}
}
Related information
Declare report layouts in AL
DefaultHeaderFooterPart property
HeaderFooterPart property
ThemePart property
DefaultRenderingLayout property
Defining multiple report layouts
Getting started with AL
Developing extensions