Subreports in a mail merge report
You can include subreports in mail merge definitions. By using a subreport, you can include more details (for each record in the main report).
Adding a subreport is similar to adding subreports to a standard 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 line break (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 line break (SHIFT+ENTER) where necessary.
In Word, a hard line break (ENTER: ENTER symbol) and a soft line break (SHIFT + ENTER: SHIFT+ENTER symbol) are represented by different characters. This helps you choose the appropriate type of line break for your content.