Inserting flexible sub reports in a mail merge report
In order to create a mail merge report in which the values of individual fields can be listed in the same paragraph as the descriptive text of your choice, you can insert a flexible subreport into your mail merge report. The procedure to do this is identical to that described in
To include sub reports in your report definition, however regarding the template used, the following must be adhered to:
• The template used must be in either .doc, .docx or .rtf format.
• The flexible subreport must be preceded and succeeded by a carriage return in the template.
• The start of a flexible subreport is indicated by the tag [Start:flexible subreport name]. The end of the subreport is indicated by the tag [End:flexible subreport name].
| Tags are case sensitive and the capitalization must be observed. |
• The text and merge code tags between the start and end tag of the subreport are repeated for every record (that is, element) in the subreport.
• Carriage returns cannot be used between the start and end tags of the flexible subreport, otherwise an error occurs when generating the mail merge report. Soft line breaks (i.e. SHIFT+ENTER) can be used within the subreport.
• When creating the template, write a paragraph of text as required and simply insert the field merge codes within the text.
• The merge codes you use in the template must be identical to those defined in the Report definitions and settings dialog box for the fields you want to include in your subreport. Furthermore, the merge codes in the subreport must be unique within the report definition.
• In the case of a price announcement letter for contract lines, if you want to include the Period start date or Period end date fields in your report, you must perform the following steps:
1. Create an expression in the Report definitions and settings dialog box.
2. Enter a function that returns a date, e.g. currentDate().
3. Specify the date format in the Mask field of the dialog box.
4. Enter the merge code ‘PERIOD_BEGINDATE’ or ‘PERIOD_ENDDATE’
If you use the merge codes in the template they will be replaced with the Start date of period and End date of period as entered in the price announcement letter dialog box.
• It is not possible to use tables or cells within in a flexible subreport