Report Template Setup


A report template controls when an FX Reports is available for use.

You must add a report template for every FX Reports.


To add and setup report templates, you must

Have these user licenses: Have these permissions: Complete these tasks:
before continuing
  • System permissions:

    • Customize Application

    • Manage Profiles and Permission Sets

    • View Setup and Configuration

Create report templates with a streamlined interface using the Report Templates tool in the Admin Portal.

Best Practices

Know Your Objects

  • It is paramount to understand what Objects to include in the Report

  • Create a model of the referenced information (for example, using a visual diagram or written text).

    This helps to "map” what to include for each Object and understand the how to access the desired information.

    Example 1. Object Relationships

    To get to the desired information, navigate through several parent and/or child objects. You can find the information by navigating in different ways.

    • Parent → Child → Grandchild

    • Parent → Grandparent → Children → Grandchildren

    • Parent → Children → Grandchildren → Parents

Plan White Space

  • Margins are intended to keep the data accessible and easy to read. In some cases, margins can go to the very edges of the template. Other cases require larger borders for a Header or Footer.

  • When reviewing the PDF example, consider the spacing on the left, top, right, and bottom margins.

  • Set margins at the Template level before any additional values within tables.

Consider Orientation

  • Be aware of height and width of the example provided by the Customer.

  • If the width is greater than the height, set pageOrientation=”landscape”.

    If you switch the pageOrientation mid-build, you must rework every table.

Conduct Test Prints

  • If there is a chance the report may ever be printed, always conduct a test print.

  • While XML/PDF’s generally match a printed counterpart, the look,feel, margins, text size, and other settings may vary on the printed report.

  • Always verify additional printed copies (carbon copies).

Margins Are Listed Clockwise

  • When setting Template or Table margins, remember that the margins are set in this order:

    Left, Top, Right, Bottom

    The first value is always the Left Margin.

    Example 2. Left and right margins = 36, top margin = 120, bottom margin = 72
     <template pageSize="LETTER" pageOrientation="portrait" pageMargins="36 120 36 72" preprocess="true">
    Example 3. Left and right margins = 36, top and bottom margins = 40
     <table  margin="36 40 36 40" columnWidths=”* 100”>

Formula References

  • Formulas must have a prior reference of the field(s) that is included in the formula itself.

  • Formulas cannot “call” a field. The data must already be indicated in the Report.

  • Indicating the data can be done in any number of ways.

    One method is to indicate the Field either in a comment or outside of the <tableBody>.

    Example 4. Using a comment to reference the desired field.
    <!-- {{Field_Reference__c}} {{Field_Reference2__c}} -->
      <cell>{{formula "round({0} * {1},2)" Field_Reference__c Field_Reference2__c }}</cell>

Add a Report Template

You can add a report template.

  1. Access FieldFX Back Office.

  2. Open the Report Templates tab.

  3. Click New.

  4. Complete the following:

    Field Action


    In this text field, there is a formula that determines if a form is available for a user.

    If the formula evaluates as true, then the form will be available.

    The formula will be written in the context of the Form Subject field so the formula can reference fields on that selected object.

    Report Template Name

    Enter a name for the report template.


    Enter the API name of the object for which you added the report.

    Example 5. Enter the API Name for SObject

    If the report is for the Ticket object, enter FX5__Ticket__c.

    Some other object names are:

    • FX5__Jobs__c for the Jobs object

    • FX5__Quotes__c for the Quotes object

    • FX5__WorkOrders__c for the Work Orders object

  5. Specify when to use the report:

    Field Action


    Select a customer to use the report for that customer.


    Select an office to use the report for that office.


    Select a business segment to use the report for that segment.

    SObject Record Type

    Enter a record type to use the report for that record type.

  6. In Sequence Number, enter a sequence number to use for the report.

    Sequence numbers control the order of reports in lists. Refer to the sequence number article for more information.

  7. Click Save

  8. Attach the template for a PDF report:

    Create only a single attachment. If you have more than one, there could be issues for other FieldFX Mobile users. An error could occur when generating the report. .. Click Attach File. .. Click Choose File. .. Select the template. .. Click Attach File. .. Click Done.
  9. Configure sharing settings to grant access to the report template.

  • Advanced users can take advantage of the Handlebars template library.