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 HeaderFooter 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 HeaderFooterPart 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 = HeaderFooter, and it must point to a .docx file.
A Body layout holds only the document body. The header and footer content comes from the layout that HeaderFooterPart references. Several Body layouts can reference the same part, so you can maintain the header and footer in one file.
If HeaderFooterPart references a layout that has another type or subtype, the compiler reports an error.
To use one header and footer part across all Body layouts in a report, set the DefaultHeaderFooterPart property on the report instead.
Example
The following example declares a Body layout that gets its header and footer from one part, and its fonts and colors from a theme part.
report 50100 "Customer List With Parts"
{
ApplicationArea = All;
UsageCategory = ReportsAndAnalysis;
DefaultRenderingLayout = CustomerBody;
dataset
{
dataitem(Customer; Customer)
{
column(Name; Name)
{
}
}
}
rendering
{
layout(CustomerBody)
{
Type = Word;
SubType = Body;
HeaderFooterPart = CorporateHeaderFooter;
ThemePart = CorporateTheme;
LayoutFile = 'Reports/Layouts/CustomerBody.docx';
}
layout(CorporateHeaderFooter)
{
Type = Word;
SubType = HeaderFooter;
LayoutFile = 'Reports/Layouts/CorporateHeaderFooter.docx';
}
layout(CorporateTheme)
{
Type = Word;
SubType = Theme;
LayoutFile = 'Reports/Layouts/CorporateTheme.dotx';
}
}
}
Related information
Declare report layouts in AL
DefaultHeaderFooterPart property
DefaultThemePart property
ThemePart property
DefaultRenderingLayout property
Defining multiple report layouts
Getting started with AL
Developing extensions