The solution I provided earlier applies to RDLC reports. I wasn’t aware you were looking for a solution specifically for Word layouts, as it wasn’t mentioned in your query.
Unfortunately, due to some limitations in Word layouts, it’s not straightforward to have a header only on the first page and a footer only on the last page when generating reports in Business Central. If you were creating a normal document manually in Word, this would be possible. However, in reports, we can’t use visibility logic in Word layouts, which makes this requirement unachievable in most cases.
Word handles headers and footers in static ways for regular documents because it knows the page structure during design time. In Business Central, Word layout reports are dynamically generated based on the data, so Word doesn't know the total number of pages in advance. This limitation affects requirements like yours.
For single-page reports, both the header (first page) and footer (last page) will appear because they share the same page. For multi-page documents, you can follow the steps outlined in this video:
https://www.youtube.com/watch?v=rFbd7B8BFck
However, extra spacing issues might arise (As you can see the below ss), and this approach may not be suitable for reports with strict layout requirements.
For more details, you can refer to the official documentation:
https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-howto-report-layout?tabs=vscode
https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-howto-report-layout?tabs=vscode#headers-and-footers-in-word-layouts
https://support.microsoft.com/en-us/office/configure-headers-and-footers-for-different-sections-of-a-document-94332643-a6e9-46aa-ab29-064f1d356db6
Hi, good day
I hope this can help you, and give you some hints.
How to do the header is only visible in First Page of report
Show a Footer Only on the Last Page? – think about IT
Best Regards
Gerardo
André Arnaud de Cal... 291,472 Super User 2024 Season 2
Martin Dráb 230,560 Most Valuable Professional
nmaenpaa 101,156