{"title":"DefaultThemePart Property","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/properties/devenv-defaultthemepart-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-defaultthemepart-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-defaultthemepart-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 DefaultThemePart property sets the fonts, colors, and styles 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":191,"chars":83},{"level":2,"title":"Remarks","slug":"remarks","at":274,"chars":655},{"level":2,"title":"Example","slug":"example","at":929,"chars":991},{"level":2,"title":"Related information","slug":"related-information","at":1920,"chars":387}],"text":"> Version: _Available or changed with runtime version 18.0._\nSets the default theme part, defined as a layout with the Theme 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\nDefaultThemePart 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 devenv-defaultrenderinglayout-property.\nThe 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.\nUse 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 devenv-themepart-property on that layout.\n## Example\nThe following example gives both Body layouts of the report the same theme, without repeating the reference on each layout.\n```al\nreport 50103 \"Customer List Branded\"\n{\n    ApplicationArea = All;\n    UsageCategory = ReportsAndAnalysis;\n    DefaultRenderingLayout = ShortBody;\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(ShortBody)\n        {\n            Type = Word;\n            SubType = Body;\n            LayoutFile = 'Reports/Layouts/ShortBody.docx';\n        }\n        layout(DetailedBody)\n        {\n            Type = Word;\n            SubType = Body;\n            LayoutFile = 'Reports/Layouts/DetailedBody.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-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>"}