Subreports in a mail merge report
It is possible to include subreports in mail merge definitions. The procedure is similar to including subreport(s) in a regular report definition, as described in To include sub reports in your report definition.
* 
For more information on how to create the mail merge definition and template file, refer to Creating mail merge definition and a template file.
Example
The following example is a catering confirmation with a subreport on the order lines that have been created.
Report hierarchy
The template file should contain the subreport name in square brackets: [Order lines].
Reports will replace the subreport tag with a table listing the fields of the subreport in columns. This works for both HTML and Word templates.
Report example
Important notes
When your report includes a subreport with specific fields, its definition must begin with [Start:data] and end with [End:data].
Example
Subreport in a template
Avoid using a hard ENTER (pressing the ENTER key) within the [Start] and [End] tags, as it can disrupt the code.
Instead, either refrain from adding line breaks entirely or use a soft ENTER (SHIFT+ENTER) where necessary.
In Word, a hard ENTER (ENTER symbol) and a soft ENTER (SHIFT+ENTER symbol) are represented as different characters, so ensure to use the appropriate one.