Report Templates Setup

Exago can map data onto PDF, RTF and Excel templates. To utilize this feature the templates must be properly set up in order to accept data from Exago. After being configured (see below) templates should be saved in the report path and these templates will be detected automatically by Exago.

NOTE. Configuring templates varies slightly by format.

PDF Templates

On the PDF Template file create Form Fields where you want to map data. Remember that the name of the field will be displayed to users in Exago.

For items that repeat (those that will be mapped to cells in a ‘detail section’) give each form field the same name followed by a period and a number starting with 0. (ex. item.0, item.1, item.2, etc.)

Check the Multiline property on any PDF field where data may need to wrap to fit inside the field.

NOTE. Although you can use any program you would like to create and edit PDF templates we recommend Adobe Acrobat Professional or

Check Boxes in PDF Templates

Checkboxes are not currently supported in PDF templates. However the steps below detail how to have Exago populate a text field with a check mark.

  1. For the PDF text field you want to contain checks set the font to wingdings. Do not put a border on the field. Save the template and place it in the report path.
  2. In a cell on the report use an IF function whose results are char(254) for a checked box and char(111) for an unchecked box [ex. =if({Employees.Title} = 'Sales Representative' , char(254), char(111))]
  3. In the Template menu assign the cell to the pdf field.

RTF Templates

For RTF Template files create Bookmarks where you want to map data. Bookmark names do not display on the document, so we suggest typing the bookmark name in the document where the field will go, then select the text and make it a bookmark.  The typed text within the bookmark will be replaced by mapped data when the report is executed.

There are two ways to display content that repeats on an RTF Template (those that will be mapped to cells in a ‘detail section’).

  • If there will be a limited number of repetitions. Give each bookmark the same name followed by an underscore and a number starting with 0. Ex. item_0, item_1, item_2, etc.
  • For content that may need to repeat an indefinite number of times. Create a single line of content and create a bookmark with the name structure RepeatForEach_bookmarkname.

Dynamic content with RTF Templates

RTF Templates may also use Bookmarks to dynamically hide/display text or entire paragraphs. 

To do this:

  1. Select the text/paragraph you want to display/hide.
  2. Make a bookmark using the naming convention  KeepIF_name
  3. In Exago make a formula that  as that returns 1 if the text should be displayed and 0 if it shouldn’t (ex. ‘=if({Products.ProductName} = ‘Chai’, 1, 0)’ )
  4. In the Document Template menu set the cell with the if condition to the bookmark.
  5. Run the report as RTF.

Excel Templates

The first worksheet of the Excel template should be left blank (except for the first row) as this is where Exago will populate the data. In the top row of this sheet place the name of the column that will be seen by the end user. All the other worksheets in the template will remain unchanged by Exago.

Referencing Data in Excel Templates

When using an Excel Template there are two ways for Charts or Pivot Tables to reference the data populated by Exago: Named Ranges or referencing specific rows.

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 creating the Template utilize Named Ranges by:

  1. In the formula tab open the Name Manager
  2. Add a new Named Range whose name matches the name of the first Worksheet. In the “Refers To” property select the upper left and upper right boundaries of the desired range. (Ex. If you want all the data from columns A – J, select cells ‘Sheet1!$A$1:$J$1’.)
NOTE. When the report is executed Exago will modify this range to include all of the rows in these columns that include data. (In the previous example if the report had 100 rows the range would be updated to ‘Sheet1!$A$1:$J$100’.)
  1. Set the Chart or Pivot Table to use the Named Range as its Data Source.

Row Selection

Instead of using Name Ranges each Chart or Pivot Table can be set to reference the first two rows on the first worksheet. (Ex. For a template with 5 columns the reference would be ‘=Sheet1!$A$1:$E$2’.) When the data is populated by Exago rows are inserted in a fashion that these references will automatically expand to incorporate each row of data.

Hidden Article Information

Article Author
Alex Agoado
created 2015-12-15 18:40:08 UTC
updated 2016-01-05 21:02:40 UTC

excel, template, report template, pdf template, pdf, rtf template, rtf, excel template, forms,
Have more questions? Submit a request