> For the complete documentation index, see [llms.txt](https://help.tillit.cloud/tillit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.tillit.cloud/tillit/knowledge-base/setting-up-tillit/configuration/creating-and-using-report-templates.md).

# Report Templates

## Overview

{% hint style="info" %}

* A Report Template generates PDF (and HTML) reports from data in TilliT — from an order, a shift, or one or more boards. Common uses include an end-of-order report for auditing, a certificate of analysis, an end-of-shift compliance report, or a scheduled summary pulled from board records.
* A Report Template can also incorporate images from submitted activities, and lets you format the report layout to your liking.
* Building a Report Template is a two-step process:
  1. Filter the data the report should draw on — which activities, order attributes, or boards to read from.
  2. Build an HTML template that formats the final PDF — add your company logo, fonts, and colours.
     {% endhint %}

This guide covers creating and managing Report Templates, and how each of the three data types — ORDER, SHIFT, and BOARD — is used.

## Navigation

Navigate to ***Settings > Configuration > Report Template*** to open the configuration page.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-5b49025f80d214eef6df98638e643fae037877aa%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## Creating a Report Template

Click **Create** to open the creation modal.

<table><thead><tr><th width="209">Name</th><th>Desc</th></tr></thead><tbody><tr><td>Name</td><td>The name of the report.</td></tr><tr><td>Description</td><td>A description of the report.</td></tr><tr><td>Data type</td><td>ORDER, SHIFT, or BOARD — determines what the report draws data from. See <a href="#order-reports">Order Reports</a>, <a href="#shift-reports">Shift Reports</a>, and <a href="#board-reports">Board Reports</a> below.</td></tr><tr><td>Asset Classes</td><td>Which asset classes are included in the report. Not shown for BOARD type templates.</td></tr><tr><td>HTML Template</td><td>Create a new HTML template or use an existing one. Options are Blank, Order Starter Template, or Shift Starter Template.<br>Choose Blank for a completely empty template.<br>If you don't have HTML or handlebars scripting experience, use one of the Starter Templates — it matches the Data type you selected.</td></tr><tr><td>Attributes</td><td>Which attributes are included in the report. Not shown for BOARD type templates.</td></tr><tr><td>Activities</td><td>Which activities are included in the report. Not shown for BOARD type templates.</td></tr><tr><td>Operations</td><td>Which order template operations are included in the report, as a comma-separated list. Not shown for BOARD type templates.</td></tr><tr><td>Include Images</td><td>Whether to include activity images in the report. Not shown for BOARD type templates.</td></tr><tr><td>Sort By</td><td>Sorts the Activities in the report by Completed At date or Issued At date. Not shown for BOARD type templates — board sorting is configured per board, see <a href="#configuring-board-data">Configuring board data</a>.</td></tr><tr><td>Sort Direction</td><td>Sort direction for the chosen Sort By field.</td></tr></tbody></table>

For this example, we'll create an **Order Report** of type **ORDER**. After filling out the details, click **Save and Open**.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2FJYR0ui2h7ksK5PIFktoB%2Fimage.png?alt=media&amp;token=6cda2a8f-cb70-432b-988d-af6cac0c1360" alt=""><figcaption></figcaption></figure>

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2FPl2JTcgFfXNKSP9PbPBR%2Fimage.png?alt=media&amp;token=c96a3631-9515-4a7b-a48c-0a6216d359d5" alt=""><figcaption></figcaption></figure>

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fq2U4rmrQ8PSFhf3QUusL%2Fimage.png?alt=media&amp;token=4ac84f7d-e019-46a9-b987-ffa22b9bc8c2" alt=""><figcaption></figcaption></figure>

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2FbOd5xEVmEwybmtgJlsuz%2Fimage.png?alt=media&amp;token=38514726-df66-4245-aed4-35429655c356" alt=""><figcaption></figcaption></figure>

## Selecting Report Content

### Order and Shift reports

Besides the fields in the creation modal, you can filter which activities — and which of their activity items — are included.

#### Include All Activities

When enabled, newly added activities are automatically included. Choosing activities individually instead allows for activity item filtering.

You'll see a list of all available activities for visibility.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2FL5F5Amm4SR8zjCfeUeYT%2Fimage.png?alt=media&amp;token=d7aac9ed-8384-4d71-874a-075e89efa47f" alt=""><figcaption></figcaption></figure>

#### Choosing individual activities and items

Turn off Include All Activities to choose which activities are included in the report. Each activity has an expansion panel giving finer control over which items are included. Settings save on change.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Feh0lcmsODRflHVRylZxt%2Fimage.png?alt=media&amp;token=8d21b351-7215-4f4b-a14f-2e224514cbd4" alt=""><figcaption></figcaption></figure>

### Board reports

BOARD type templates configure their content per board rather than by activity — see [Configuring board data](#configuring-board-data) under Board Reports below.

## Building the HTML Template

Use the HTML editor to design and lay out your report. TilliT uses the [Mustache](https://mustache.github.io/mustache.5.html) templating engine, which inserts data dynamically using curly braces, e.g. `{{order.order_number}}`.

{% hint style="warning" %}
If an HTML Template is used by more than one Report Template, editing it displays a warning listing the other Report Templates that share it. Review the list before saving, to avoid unintended changes to other reports.
{% endhint %}

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2FqdGbk2SLdCjniRGHI4n7%2Fimage.png?alt=media&amp;token=b45eec88-2ede-4ed5-b3db-e124cdba82e1" alt=""><figcaption></figcaption></figure>

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-d7449f67d0e14158d581e00c3cd0e29a8daaab3a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
**Referencing activity items' values**

To reference an activity item's value, use:

```handlebars
<td>
  {{#if this.stringValue}}
    {{this.stringValue}}
  {{else if this.numericValue}}
    {{this.numericValue}}
  {{else if this.booleanValue}}
    {{this.booleanValue}}
  {{else}}
    {{this.value}}
  {{/if}}
</td>
```

Referencing `this.value` alone displays the item's raw value, which might not be nicely formatted.
{% endhint %}

## Previewing Your Template

Use the Preview Panel to see what your template will render. It has three views:

* **Preview HTML** shows what the HTML in the editor renders as, in a single scrolling page.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Ffh0HoLdU0qB0yB9KjYBF%2Fimage.png?alt=media&amp;token=dba4b07b-9423-41cb-bdb7-8afa7c89dcc3" alt=""><figcaption></figcaption></figure>

* **Preview PDF** renders a PDF formatted with your HTML, which can be saved and viewed like any other PDF.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fkd4WPaHVdOQIQ5fsJ2kb%2Fimage.png?alt=media&amp;token=3920ba62-aab6-4db1-ad4e-1da867aac21d" alt=""><figcaption></figcaption></figure>

* **Order Data** shows the data available — from the chosen preview order plus the assets, attributes, and activities you selected earlier — so you can work out how to reference it in your data insertion.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2FPPySofc4dWfazauOCNU2%2Fimage.png?alt=media&amp;token=5bd7103a-fee1-49db-8029-20d76fb19ebc" alt=""><figcaption></figcaption></figure>

For SHIFT type templates, the preview panel shows an **Asset** and **Shift Instance** selector instead of an order, and the data view is labelled **Report Data** instead of **Order Data**. Board reports use their own preview flow — see [Previewing a board report](#previewing-a-board-report) below.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-eaceef15e59abb2184d3e3a9c72ab8c06b7da9db%2Freport-templates-shift-type-preview.png?alt=media" alt=""><figcaption><p>Preview for a SHIFT type report template</p></figcaption></figure>

## Order Reports

Order Reports produce a PDF using data from a single order.

Once your template is created, go to **Orders**, choose an order, and click **Details**. Next to the order name is a printer icon button.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-5bd451bd0aaea9da6998ca4572dd25a137b6d093%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

Clicking it opens a dialog letting you download the report.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-7236cc9b9a5df4d0d614481beffe01cd8b882f7a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## Shift Reports

Report Templates with **Data type** set to **SHIFT** are scoped to a shift instance rather than an order. Use this to generate a report for a complete shift, even when no order was running — for example, an end-of-shift compliance report.

When creating a Report Template, choose the **Shift Starter Template** option to start from a template already set up for shift data.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-4125979e62e3d02d9d2b5bdf948e6513113ea030%2Freport-templates-order-shift-type-selection.png?alt=media" alt=""><figcaption><p>Choosing between Order Starter Template and Shift Starter Template</p></figcaption></figure>

{% hint style="info" %}
To have a shift report generated automatically when a shift ends, select this Report Template on a subscription with Event Type **Shift Ended**. See [User Subscriptions](https://gitlab.com/tillit-do/documentation/tillit-docs/-/tree/main/lang/en-au/help/users/manage/user-subscriptions.md).
{% endhint %}

## Board Reports

Report Templates with **Data type** set to **BOARD** pull data directly from one or more boards instead of an order or shift. Use this for reports built from reference data, or that summarise records logged against a board over a period of time.

### Configuring board data

Add up to four boards to the template. Each board's data is fetched and reported independently — there's no automatic matching between boards.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-8c306ea77deb3d1f954270f20bee07b34942dc5b%2Fboard-report-templates-20260919151443.png?alt=media" alt=""><figcaption></figcaption></figure>

For each board, configure:

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-a3955ba8c83cc37eea5273f388a1e05089c44111%2Fboard-report-templates-20260919151516.png?alt=media" alt=""><figcaption></figcaption></figure>

| Field                          | Description                                                                                                                                                           |
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Alias**                      | The name used to reference this board's data when writing the report layout.                                                                                          |
| **Related records to include** | Pulls in linked record details (e.g. a name) instead of just an internal ID. Including more of these increases the report's size.                                     |
| **Date field** (optional)      | Which of the board's date fields the report's date range applies to. Leave unset to include the whole board regardless of dates — useful for reference/lookup boards. |
| **Asset scope** (optional)     | Restricts this board's rows to the report's selected asset, via a relationship field you choose.                                                                      |
| **Sort field and direction**   | Determines which rows are kept if the board has more matching rows than the maximum.                                                                                  |
| **Maximum rows**               | A safety limit. If more rows match, the report uses the first batch (by the configured sort) and is marked as incomplete.                                             |

While configuring, review the live record count and summary line shown under each board, to confirm the setup matches something before saving. The count greys out temporarily right after an edit, until the change is saved.

{% hint style="info" %}
**Zero records?** This can mean the board itself is empty, nothing falls inside the selected date range, or nothing matches the selected asset.
{% endhint %}

{% hint style="warning" %}
**Report size warnings** appear as you approach the overall report size limit, and a stronger warning appears if it's exceeded. If you see one, try in this order: turn off unneeded related records, narrow the date range, lower a board's row limit, then remove a board as a last resort.
{% endhint %}

{% hint style="warning" %}
If a board's structure changes after the template was set up (a field is renamed or removed), any setting pointing at that field shows a "this field is no longer on the board" error. The template still works, but should be corrected. If the board itself is deleted, the template shows a warning and can't generate correctly until the reference is fixed.
{% endhint %}

Once your boards are configured, write the report layout referencing the board aliases and fields, the same way as for ORDER and SHIFT type templates.

### Previewing a board report

Set a preview date range (and asset, if the template scopes by asset), then use the preview panel to check your work before finishing the layout:

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-222c399bc872f26494e99bbde22ef9e1660b6b3c%2Fboard-report-templates-20260919151626.png?alt=media" alt=""><figcaption></figcaption></figure>

* **Report Data** shows the raw data available, so you can confirm field names and structure.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-13d89948c21555a1f92924631762dee0c3120f45%2Fboard-report-templates-20260919151610.png?alt=media" alt=""><figcaption></figcaption></figure>

* **Preview HTML** or **Preview PDF** renders the visual result using the same data as a real run — what you see is what you get.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-193c76ccd038348ad306d14e3476096ed0774dc2%2Fboard-report-templates-20260919151557.png?alt=media" alt=""><figcaption></figcaption></figure>

### Generating an ad-hoc report from a board

Open a board and click **Generate report**:

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-9c4c2331aeb31ab8714774f7672a8cbb0b2b06b4%2Fboard-report-templates-20260919151822.png?alt=media" alt=""><figcaption></figcaption></figure>

Choose a report template — different templates may show different data:

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-2dca34a7ef6e274c485f42bc2cb71fa3c0532c95%2Fboard-report-templates-20260919151844.png?alt=media" alt=""><figcaption></figcaption></figure>

Set a date range if the template has a date field configured — this filters the report to data within that window. If no date range is set, all rows are pulled until the row limit is hit. If the template requires it, select an asset to narrow the report to that asset's data.

{% hint style="info" %}
If no templates exist for a board yet, no report can be generated — an admin needs to create one first in **Settings > Configuration > Report Template**.
{% endhint %}

Start generation and wait for it to complete — this runs in the background, so you can navigate away and check back later:

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-4909bbed32f0a335631eed3a01067a2f6098ae89%2Fboard-report-templates-20260919151946.png?alt=media" alt=""><figcaption></figcaption></figure>

Once ready, download the finished report. If generation fails, try again; contact support if it keeps failing.

### Viewing previously generated reports

Open the report dialog for a board and switch to the history view. Each entry shows when that report was generated (not when the underlying data was captured — the data range is set separately, at generation time). Download any previous report directly from the list.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-0f7d9c5f45494dfa50cb86b9ad322bc9c3e11d56%2Fboard-report-templates-20260919152010.png?alt=media" alt=""><figcaption></figcaption></figure>
