When exporting a custom report document, there is special handling for table rows and ranges that contain empty merge fields. This can sometimes have unintended side effects, especially in tables that have fields across multiple columns, or tables with merged cells.
The default behavior is:
- If a table row contains merge fields, but none of the fields had values after merging, the table row is automatically removed.
- If a «RangeStart:...» range contains merge fields, but none of the fields had values after merging, the entire range is automatically removed.
You can change the default behavior by adding a custom property to your document before uploading it to Valcre.
- Open the custom report in Microsoft Word.
- Open the File menu in the top left corner.
- Click Info in the left bar.
- Click the Properties dropdown on the right side of the screen, and click Advanced Properties.
- In the Properties window, select the Custom tab.
- In the Name: field, enter "MailMerge.ClearOptions".
- In the Value: field, enter one of these options:
- "None": Nothing will be automatically be removed. Empty fields will appear blank.
- "RemoveUnusedFields": Remove fields for which no data has been found in the mail merge data source.
- "RemoveEmptyRanges" Remove «RangeStart:...» ranges into which no field has been merged.
- "RemoveEmptyParagraphs": Remove paragraphs which contained merge fields but none of them has been merged.
- "RemoveEmptyTableRows": Remove table rows which contained merge fields but none of them has been merged.
- You can also specify multiple options separated by commas, for example "RemoveEmptyRanges,RemoveEmptyTableRows".
- Click the Add button and then the OK button.
If you need to change the setting later, select the "MailMerge.ClearOption" item from the Properties: list, change the Value: field, click the Modify button, and then click the OK button.