Q.
I have a Word Layout Report, and I want a new page [document] to print per record, but it only prints one page [document] for the first record. How can I get a new page [document] per record?
A.
When creating reports, set the WordMergeDataItem property if you want more than one root-level data item to print.
A report author can use the WordMergeDataItem property of the report to specify the root-level DataItem of the report DataSet. Business Central will do a “Mail merge” between that DataItem (and the ones below it), set in the WordMergeDataItem property, and the Word layout when rendering the report. Each record generates a new page [report] in the Word Document, and the document page references are reset for each document.
Note: The WordMergeDataItem property must reference a top-level DataItem (AL0329)
Read more about the WordMergeDataItem property here.
Note: The code and information discussed in this article are for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central 2023 Wave 2 online.