Report Designer: Template

An Advanced Report can be used to dynamically fill out fields in forms and other documents. Placeholders in the document template are dynamically linked to fields in the report. When executed, the form or document is merged with the report data.

          

Template report with repeating data fills a set of form templates

To use a report to fill out a template:

  1. Enter field data in cells on the report. For repeating data:

  2. On the toolbar, click  Advanced, then click  Templates to open the Report Templates dialog.

  3. Select an existing template or click the Upload button to add a new one.

  4. For each template field, select either:

  5. Optional: Choose whether to allow each field to be editable in the exported PDF file by selecting Allow Edit.

  6. Click Okay.

To remove a template from a report:

  1. From the Template window, select the blank option from the template list.

  2. Click Okay.

Making templates

The process for making templates differs between the three supported types: PDF, Word, and Excel; as do the available features.

PDF Templates

PDF templates support static fields and limited-repeating fields. PDFs are convenient for preexisting and standardized forms, such as for government or businesses.

To make a PDF template:

  1. Open a PDF in a PDF editor program, such as Adobe Acrobat or PDFescape.

  2. Add form fields where you will insert report data. For fields where text may span multiple lines, select the multi-line property.

  3. Give each form field a unique name, as follows:

  4. Save the PDF file. Then upload it to the report.

Microsoft Word Templates

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 make a Word template:

  1. Open a Word file in Microsoft Word or a compatible document editor.

  2. Add text where you will insert report data.

  3. Select the text and add a bookmark.

  4. Give each bookmark a unique name, as follows:

  5. Optional: To conditionally show or hide text:

    1. Select the text and add a bookmark with the following naming format:

      KeepIF_Name

      Where Name is a unique name.

    2. In the report, map this field to a cell with a formula that returns 1 if the text should be shown, and 0 if the text should be hidden.

      Example

      =If ( {Products.ProductName} = "Chai", 1, 0 )

  6. Save the file. Then upload it to the report.

Microsoft Excel Templates

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 make an Excel template:

  1. Open an Excel file in Microsoft Excel or a compatible spreadsheet editor.

  2. The first worksheet is used for dynamic report data. Repeating cells are mapped to columns in the worksheet. For each column where you will add report data, enter a unique name to the topmost cell in the column. All following cells must be empty. All other worksheets will remain unchanged by the report.

    Formatting an Excel file to be used as a template

  3. Save the file. Then upload it to the report.

Executing Template Reports

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). Reports can be exported from the Report Designer 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) to be autofilled. Review the General Section of the Report Options for details on how to control report export types.

Referencing Data Exported to Excel Templates

When using an Excel template there are two ways for charts or PivotTables to reference the populated report data:

Named Ranges

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:

  1. On Excel's ribbon, navigate to the Formulas tab and click the Name Manager icon.
  2. Click New to add a new named range.
    1. The Name must match the name of the first worksheet in the file.
    2. The Scope should be Workbook if the chart or PivotTable will reside on a different worksheet than the first one.
    3. Optional: add a comment
    4. In the Refers to field, select the upper left and upper right boundaries of the range. For example, to select all of the data from columns A—J, select those cells or enter DATA!$A$1:$J$1.

       Note
      When the report is exported, the range will automatically be expanded to include all of the rows.

  3. When building the Excel chart or PivotTable, use the Named Range created in steps 1–2 as its data source.

Row References

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.