Creating HTML template reports

HTML template reports are similar to document template reports. You don't have to upload a file, but can define your HTML code within the report definition page.

To create an HTML template report, do the following:

  1. Create a new report by doing any of the following:
    • Click New Report in the Reports tab in the default Platform application.
    • Open an object definition, select Reports from the ribbon, and click New Report.
    • Open any page containing a section with a report link and click New Report in that section's header.
  2. Select an object to Report On and the select HTML Template as the Report Type.
  3. Specify a Report Name and provide description if required.
  4. In the Report Name Template field, specify a name for the report template. You can use date, month, and/or year tokens. If you do not input any value, the name of the report is used as the file name by default. Special characters are converted to underscore in file names.
    Note: You can see the HTML report names reflected when you send report emails, create new batch jobs, use report filters, and use report tokens in Document template.
  5. Define your report template using the template helper. The following example shows a report definition that prints a list of Lead records:
    <html>
       <head>
       <h2>List of Leads </h2>
       </head>
       <body>
       <table>
       {!#LOOP_BEGIN.all#154785}
       <tr>
       <td>{!name#text}</td><td>{!type#value}</td>
       </tr>
       {!#LOOP_END.all}
       </table>
       </body>
       </html>

    Note that this report runs a loop through all records using a view with the original ID 154785. Inside the loop, each record outputs a row of an HTML table.

    For a summary report, you can use the Platform query API in an EVAL block.

  6. Optionally, specify report filters for the object. For example, if you are generating a report on an object that stores your customer information, then you can apply a filter that direct Platform to include only customers from Asia in the report.
  7. Specify the access permissions (see Access control).
  8. Click Save.