{"title":"DefaultHeaderFooterPart Property","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/properties/devenv-defaultheaderfooterpart-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-defaultheaderfooterpart-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-defaultheaderfooterpart-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 DefaultHeaderFooterPart property sets the header and footer part that the Body Word layouts of a report use in Business Central.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Applies to","slug":"applies-to","at":206,"chars":83},{"level":2,"title":"Remarks","slug":"remarks","at":289,"chars":665},{"level":2,"title":"Example","slug":"example","at":954,"chars":1094},{"level":2,"title":"Related information","slug":"related-information","at":2048,"chars":380}],"text":"> Version: _Available or changed with runtime version 18.0._\nSets the default header/footer part, defined as a layout with the HeaderFooter subtype, that should be used for the Word layouts of this report.\n## Applies to\n Report\n> APPLIES TO: Business Central 2026 release wave 2 and later\n## Remarks\nDefaultHeaderFooterPart sets the header and footer 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 devenv-defaultrenderinglayout-property.\nThe referenced layout must be a Word layout that has `SubType = HeaderFooter`, and it must point to a `.docx` file. If it references a layout that has another type or subtype, the compiler reports an error.\nUse this property when all Body Word layouts in the report share one header and footer. To set the part for a single layout, use the devenv-headerfooterpart-property on that layout.\n## Example\nThe following example sets a header and footer part and a theme part for the whole report. The Body layout doesn't repeat these references.\n```al\nreport 50102 \"Customer List Report\"\n{\n    ApplicationArea = All;\n    UsageCategory = ReportsAndAnalysis;\n    DefaultRenderingLayout = CustomerBody;\n    DefaultHeaderFooterPart = CorporateHeaderFooter;\n    DefaultThemePart = CorporateTheme;\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            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-defaultthemepart-property\ndevenv-headerfooterpart-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>"}