Note
Document Templates are an optional feature. Check with the system administrator for more information.
An Advanced Report can be used to dynamically fill out fields in forms and other documents. Placeholders in the document are dynamically linked to fields in the report. When executed, the form or document is merged with the report data.
Report layout in the Advanced Report Designer
Report data
W9 template form with data merged from report
This article covers the three stages of working with document templates:
The process for making templates differs between the three supported document types: PDF, Word (.doc, .docx and .rtf), and Excel; as do the available features.
Caution
Close the template file before running or saving a report that uses it.
PDF templates support static fields and limited-repeating fields. PDFs are convenient for pre-existing and standardized forms, such as for government or business.
To create a PDF template:
Name.0, Name.1,...Name is shared by the repeating fields, and 0 maps to the first value, 1 maps to the next value, and so on.=if({Employees.Title} = 'Sales Representative', 'X', ' ').Word templates support static fields, limited and unlimited-repeating fields, and conditional suppression.
Tip
Supported file types are
.doc,.docx, and.rtf. Report templates exported as “RTF” will save to the original file type.
To create a Word template:

FieldName_0, FieldName_1, ... Where Name is shared by the repeating fields, and 0 maps to the first value, 1 maps to the next value, and so on.RepeatForEach_FieldName Where FieldName is a unique name. A RepeatForEach section in templating follows similar structure and purpose to grouping within reports. It is used to organize information under repeating groups within templates, arranging related information on the same page and separating groups with page breaks.
Important
Bookmark formatting for unlimited-repeating fields must follow specific spacing requirements. The opening bookmark bracket should be placed one line before the repeating field section begins, and the closing bookmark bracket should be placed one line after the repeating field sections ends. Refer to the Employee Information example above for a visual reference. If this formatting is not followed, an “itemStart and itemEnd must be contained in one text body” error may be thrown.
KeepIF_FieldName Where FieldName is a unique name.=If({Products.ProductName} = "Chai", 1, 0)
Excel templates work differently than other types. Templates are used to fill Excel columns with report data. This is useful for passing data to Excel charts, pivot tables, and macros.
To create an Excel template:
Formatting an Excel file to be used as a template
To use a report to fill out a template:
Editing of fields in exported PDF templates, v2018.2+
Settings menu, click
Template to open the Report Templates dialog. Select an existing template or click the Upload button to upload a new one.
Advanced menu, click
Templates to open the Report Templates dialog.To remove a template from a report:
To generate the filled out forms or documents, simply Export the report in the same format as the template file (e.g. for a PDF template file, export the report as a PDF. For a Word template, export as RTF). Reports can be exported from the toolbar or from the main menu.
Tip
Template reports must be exported in the same file type as the template (i.e. a PDF template report must be exported as a PDF file). Review the General Section of the Report Options article for details on how to control report export types.
When using an Excel Template there are two ways for Charts or Pivot Tables to reference the populated report data:
Excel has a concept of a Named Range which can be used by Charts or Pivot Tables to refer to a range of cells. When building the template, name ranges by:

DATA!$A$1:$J$1.Note
When the report is exported, the range will automatically be expanded to include all of the rows.

Instead of using Named Ranges, each Chart or PivotTable can be set to reference the first two rows on the first worksheet. For example, a template with 5 columns would reference =Sheet1!$A$1:$E$2. When the report is exported, the range will automatically be expanded to include all of the rows.