Report Templates
A report template defines what appears in the generated file. Templates are reusable — the same template can be scheduled for multiple customer groups or attached to multiple notification rules.
Format and type
Section titled “Format and type”| Setting | Options |
|---|---|
| Format | PDF — Print-ready document with full layout and charts. CSV — Raw tabular data for analysis and export. |
| Type | Report — Standalone; generated on demand, scheduled, or triggered by a notification. Subreport — Embedded within a master report. |
Create a template
Section titled “Create a template”- Navigate to Reporting ⇾ Templates.
- Click + Add report template ⇾ Create new report template.
- Enter a report template name.
- Select:
- Format: PDF or CSV
- Type: Report or Subreport
- Click Add.
The template opens in the Report Builder — a drag-and-drop editor where you compose the layout.
Import a template
Section titled “Import a template”- Navigate to Reporting.
- Click + Add report template ⇾ Import report template.
- Upload the
.jsonfile and click Import.
Delete a template
Section titled “Delete a template”Click the trash icon next to the template and confirm deleting.
Report Builder
Section titled “Report Builder”The Report Builder is a drag-and-drop editor. Components are dragged from the Components library panel into the content area.
Each component includes one or more configuration sections, depending on the component type. Common sections include Data (data source, filters, series) and Layout (sizing, margins, alignment, background), along with additional settings specific to the selected component.
Component categories
Section titled “Component categories”| Category | What it provides |
|---|---|
| Text & Images | Headings, rich text, images, dividers, page breaks — basic content and formatting blocks. |
| Tables | Structured data from ThingsBoard (entity tables, alarm history, telemetry). |
| Charts | Visualizations of time series and categorical data (line, bar, pie, state, range, etc.). |
| Dashboard | Embeds a snapshot of a selected ThingsBoard dashboard as an image. |
| Subreport | Includes a reusable report template section — generates content per entity context. |
| Branding | Logos, headers, footers, and theme elements for custom look and feel. |
| Reporting Info & Layout | Metadata and layout helpers (page number, total pages, creation timestamp, spacing and breaks). |
Variables
Section titled “Variables”Variables allow you to insert dynamic values (entity details, timestamps, data keys, etc.) into any text field (block, table header, chart label, etc.) within the report. They enable context-aware and personalized report content.
Type $ in any text field to open the variable picker and insert a dynamic value.
System variables
Section titled “System variables”| Variable | Description |
|---|---|
${pageNumber} | Current page number |
${totalPages} | Total page count |
${reportCreatedTime} | Report generation timestamp (yyyy-MM-dd HH:mm:ss) |
${entityName} | Technical name of the current entity in context |
${entityLabel} | Label of the current entity in context |
${rowCount} | Number of rows in a table component |
Data source variables
Section titled “Data source variables”Any telemetry key or attribute returned by a component’s data source is available as ${keyName}. For example, a device sending temperature exposes ${temperature}.
Entity aliases
Section titled “Entity aliases”Report templates support all standard ThingsBoard entity aliases (as used in dashboards). See Entity aliases for the full list.
In addition, notification-triggered reports support the following aliases:
| Alias | Resolves to |
|---|---|
| Originator entity | The entity that triggered the notification (e.g. the device that raised an alarm) |
| Owner of originator entity | The customer or tenant that owns the originator entity |
Recipes
Section titled “Recipes”| Task | Recipe |
|---|---|
| Compare temperature across devices with a line chart | Temperature comparison report |
| Snapshot a dashboard into a PDF | Embed a dashboard in a report |
| Generate per-device alarm sections using subreports | Daily alarms subreport |
| Send a PDF alarm report with a notification | Attach a report to a notification |