{"title":"HeaderFooterPart Property","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/properties/devenv-headerfooterpart-property/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-headerfooterpart-property, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-headerfooterpart-property","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Learn how the HeaderFooterPart property sets the header and footer part that a Body Word report layout uses when Business Central renders the report.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Applies to","slug":"applies-to","at":148,"chars":90},{"level":2,"title":"Remarks","slug":"remarks","at":238,"chars":759},{"level":2,"title":"Example","slug":"example","at":997,"chars":1096},{"level":2,"title":"Related information","slug":"related-information","at":2093,"chars":387}],"text":"> Version: _Available or changed with runtime version 18.0._\nSets the layout with the HeaderFooter subtype that should be used by this Body layout.\n## Applies to\n Report Layout\n> APPLIES TO: Business Central 2026 release wave 2 and later\n## Remarks\nSet 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.\nA 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.\nIf HeaderFooterPart references a layout that has another type or subtype, the compiler reports an error.\nTo use one header and footer part across all Body layouts in a report, set the devenv-defaultheaderfooterpart-property on the report instead.\n## Example\nThe following example declares a Body layout that gets its header and footer from one part, and its fonts and colors from a theme part.\n```al\nreport 50100 \"Customer List With Parts\"\n{\n    ApplicationArea = All;\n    UsageCategory = ReportsAndAnalysis;\n    DefaultRenderingLayout = CustomerBody;\n\n    dataset\n    {\n        dataitem(Customer; Customer)\n        {\n            column(Name; Name)\n            {\n            }\n        }\n    }\n\n    rendering\n    {\n        layout(CustomerBody)\n        {\n            Type = Word;\n            SubType = Body;\n            HeaderFooterPart = CorporateHeaderFooter;\n            ThemePart = CorporateTheme;\n            LayoutFile = 'Reports/Layouts/CustomerBody.docx';\n        }\n        layout(CorporateHeaderFooter)\n        {\n            Type = Word;\n            SubType = HeaderFooter;\n            LayoutFile = 'Reports/Layouts/CorporateHeaderFooter.docx';\n        }\n        layout(CorporateTheme)\n        {\n            Type = Word;\n            SubType = Theme;\n            LayoutFile = 'Reports/Layouts/CorporateTheme.dotx';\n        }\n    }\n}\n```\n## Related information\nDeclare report layouts in AL<../devenv-report-layout-declaration>\ndevenv-defaultheaderfooterpart-property\ndevenv-defaultthemepart-property\ndevenv-themepart-property\ndevenv-defaultrenderinglayout-property\nDefining multiple report layouts<../devenv-multiple-report-layouts>\nGetting started with AL<../devenv-get-started>\nDeveloping extensions<../devenv-dev-overview>"}