Custom PDF templates
Change the design of the classic alarm report and workflow report, and the email that sends them, with a custom PDF template.
What a custom PDF template changes
With classic reports, your company can have one custom template for each of two reports:
| Template | Changes |
|---|---|
| Event Log | The workflow report: when an operator downloads or emails it from the event log, and when it's emailed after a workflow closes |
| Alarm Report | The alarm report of sites and site groups: when it's downloaded from Export PDFs, and when it's emailed on a schedule |
A template sets the content of the PDF and, if you like, the subject and text of the email that sends it. You can add your logo, rearrange or leave out parts of the report, and add your own text and values from the alarm and the site.
The site documentation has no custom template.
Custom templates are part of the Reports premium feature. To manage them, you need the permission to edit report and PDF settings: by default Administrator and Manager.
Add a custom PDF template
To add a template, go to Company › Settings › Reports.
- Under Custom PDF Templates, click Add Template next to Event Log or Alarm Report. The Custom PDF Template dialog opens with the default template of that report.
- Optional: in Email Subject Template, write the subject of the email. Leave it empty for the default subject.
- Optional: in Email Text Template, write the text of the email. Leave it empty for the default text.
- In PDF Template, change the content of the PDF. See What a PDF template contains.
- Click Submit.
The template is switched on at once and used for every report of that type.
The default template ends with a list of all values you can use, printed as raw data. Delete that part before you click Submit, or your reports show it.
What a PDF template contains
A PDF template is HTML with placeholder tags. Each tag stands for one part of the default report. Keep, reorder or delete the tags, and add your own HTML around them.
| Event Log tag | Part of the workflow report |
|---|---|
<logo></logo> |
Your company logo |
<event-log-title></event-log-title> |
The title with the alarm number |
<workflow-alarm-info></workflow-alarm-info> |
The alarm and site details |
<workflow-title></workflow-title> |
The name of the workflow |
<workflow-steps-report></workflow-steps-report> |
The steps of the workflow with their results |
<workflow-attached-alarms></workflow-attached-alarms> |
The attached alarms |
<workflow-images></workflow-images> |
The attached images |
<workflow-event-logs></workflow-event-logs> |
The event log entries of the workflow |
<workflow-history></workflow-history> |
The workflow history. Not in the default template; add it if you need it. |
<pdf-footer></pdf-footer> |
The footer |
| Alarm Report tag | Part of the alarm report |
|---|---|
<logo></logo> |
Your company logo |
<alarm-report-title></alarm-report-title> |
The title with the period |
<site-info></site-info> |
The details of the site or site group |
<alarm-chart></alarm-chart> |
The chart of alarms per day |
<alarm-list></alarm-list> |
The list of alarms |
<pdf-footer></pdf-footer> |
The footer |
Use values from the alarm and the site
In all three fields you can insert values with Pebble syntax: {{ ... }} for a value, {% if %} for a condition. The Template syntax link in the dialog opens the Pebble guide. See Text templates (Pebble).
The values you can use depend on the template, for example:
- Event Log:
alarm,workflow,device(the site) andresults. - Alarm Report:
deviceordeviceGroup,reportStart,reportEndandcontext(whether the report is for a site or a site group).
To see what each value contains, click Test Template while the value list from the default template is still in the template.
For example, in an Event Log template, this email subject names the alarm number and the alarm code:
Alarm {{ alarm.shortId }}: {{ alarmCode }}
Test a template
To check a template with real data, go to Company › Settings › Reports.
- Under Custom PDF Templates, click Test Template next to the report.
A preview opens in a new browser tab. For Event Log, it shows the latest workflow of your company, even if it's still open. For Alarm Report, it shows the current month of one of your sites. The preview uses your template only while it's switched on.
Turn a custom template off or on
To go back to the default design without losing your template, go to Company › Settings › Reports.
- Under Custom PDF Templates, switch the toggle next to the report off.
Reports use the default design until you switch the toggle on again.
Edit a custom template
To change a template, go to Company › Settings › Reports.
- Under Custom PDF Templates, click Edit Template next to the report.
- Make your changes.
- Click Submit.
The next report uses the changed template.
Delete a custom template
To delete a template, go to Company › Settings › Reports.
- Under Custom PDF Templates, click Delete Template next to the report. Delete PDF Template opens.
- In Confirmation, type
delete. - Click Confirm Delete.
Reports use the default design again. To start over, click Add Template.
If a report is empty or shows an error
- The report or email shows only "Error:" and a message: something in the Pebble syntax is wrong. Fix it, then test again.
- The report is empty: the template contains a
<script>tag or an event attribute such asonclickoronerror. evalink talos doesn't show such templates. Remove them. - The report looks like the default: the toggle is off.