Skip to content
Stand with Ukraine flag

Getting Started with Reporting

Reporting allows you to generate PDF or CSV reports from live platform data and deliver them automatically — on a schedule or in response to system events (e.g., alarms).

A reporting consists of a report template, which defines the structure, content, and format of the report, and scheduling, which defines when and how the report is generated and delivered (recurring schedule or event-based trigger).


In this step-by-step guide, you will create a daily device alarm report — a PDF file containing a device table, an alarm table, and two line charts—and then schedule its automatic delivery to different customer groups.


You need access to ThingsBoard Professional Edition with at least two customers. Each customer should own several devices. The devices must publish telemetry data for temperature and humidity, and some of them must have active alarms.


  1. Navigate to Reporting ⇾ Templates.
  2. Click + Add report template ⇾ Create new report template.
  3. Configure:
    • Name: Daily Device Alarms Report
    • Format: PDF
    • Type: Report
  4. Click Add.

The template opens in the Report Builder.


The Report Builder lets you define the report structure and layout by dragging components from the component library into the content area.

Drag a Heading component into the header content area and set the text to:

Daily Device Alarms Report

Click Apply.

Drag a Rich text component below the heading and enter a short description, for example:

This report includes the current device list, active alarms from the last 24 hours, and telemetry charts.

Click Apply.

Drag an Entity table component into the content area.

Data tab:

  • In the Datasource section, click Create new and configure a new entity alias that returns the target devices:
    • Alias name: All devices
    • Filter type: Entity type
    • Type: Device
  • In the Columns section:
    • Add column with telemetry key temperature
    • Add column with telemetry key humidity
    • Add column with attribute active
    • (Name column is included by default)

Save the component.

Drag an Alarm table component into the content area.

Data tab:

  • Time window: last day
  • Alarm source: All devices entity alias
  • Alarm filter: Active alarms
  • Enable table heading and set it, for example, to:
    Active Alarms — Last 24 Hours.
  • Optionally adjust horizontal alignment and font size.
  • Keep the default table columns unchanged.

Click Save to apply the configuration.

Drag a Line chart component into the content area.

Data tab:

  • Time window: last day, aggregation 1 hour.
  • Title: Temperature history
  • Datasource: All devices entity alias
  • Series:
    • Telemetry key: temperature
    • Label: ${entityName} temperature
  • Configure Y axis:
    • Id: default
    • Label: Temperature
    • Min: 15
    • Max: 35
    • Units: °C.
  • Set thresholds:
    • 30 °C (line color red)
    • 18 °C (line color blue)
  • Legend: position Bottom.

Save the component.

Drag another Line chart component below the previous one.

  • Time window: last day, aggregation 1 hour.
  • Title: Humidity history
  • Datasource: All devices entity alias
  • Series:
    • Telemetry key: humidity
    • Label: ${entityName} humidity
  • Configure Y axis:
    • Id: default
    • Label: Humidity
    • Min: Auto
    • Max: Auto
    • Units: °%.
  • Legend: position Bottom.

Save the component.

Before saving, set a descriptive file name pattern, for example:

daily-device-alarm-report-%d{yyyy-MM-dd_HH:mm:ss}

Click Save in the top-right corner of the Report Builder to store the configuration.


Now configure automatic delivery of the Daily Device Alarms Report for each customer using the scheduler.

  1. Navigate to Reporting ⇾ Scheduling.
  2. Click + Scheduled report.

In the Create scheduler event dialog, configure the following:

Configuration tab

  • Name: Daily Alarm Report — Customer A
  • Event type: Generate report (default)
  • Enable scheduler: enabled
  • Report template: Daily Device Alarms Report
  • User: [email protected] (Customer A administrator)
  • Time zone: Select the customer’s local time zone (e.g., Europe/Kiev (UTC+02:00)).

Recipients

  1. In the Recipients field, click Create new.
  2. Configure the notification recipients group:
    • Name: Customer A users
    • Type: Platform users
    • User filter: Customer users
    • Customer: Customer A
  3. Click Add.

Notification template

  1. In the Template field, click Create new.
  2. Name: Report generated notification
  3. Enable delivery method: Web, Email
    (To send an email, a mail server must be configured.)
  4. Click Next.
  5. Configure the email subject and body (for example):
    • Subject: Report generated
    • Message: Report '${reportName}' is ready.
  6. Configure the email subject and body (for example):
    • Subject: Report '${reportName}' is ready.
    • Message: Hello, ${recipientFirstName}. This email contains the daily device alarms report for your devices. Please review it.
  7. Click Add.

Schedule tab

  1. Navigate to the Schedule tab.
  2. Set: Time zone Start time
  3. Enable Repeat.
  4. Set: Repeats: Daily End date: set a specific date or leave empty for continuous delivery.
  5. Click Create.

The report will now be generated daily on behalf of Customer A and delivered via Email and Web notifications.

Repeat Step 3.1 for Customer B.

Create another scheduled report and set Customer B users as recipients. Reuse the same Report template and Notification template — no duplication is required.


Both schedules use the same template — Daily Device Alarms Report.

At the configured time, the system automatically generates and delivers reports to Customer A and Customer B users. Each recipient receives a report containing only the data accessible to the selected User in the scheduler.

Delivery channels

  • Web UI: Web UI: Only tenant users can view generated reports in the ThingsBoard Web UI.
  • Email: Ta message with the PDF report attached is delivered to each recipient.

Reports are generated and delivered daily without manual intervention.


You can skip building manually by importing a pre-built template:

  1. Download the daily_device_alarms_report.json template file.
  2. Navigate to Reporting ⇾ Templates.
  3. Click + Add report template ⇾ Import report template.
  4. Upload the .json file and click Import.

Edit the imported template’s entity aliases to match your own devices before scheduling.


TaskGuide
Automate delivery on a scheduleScheduling Reports
Attach a report to an alarm notificationReports in Notifications
Add charts to a reportEmbedding Charts
Embed a live dashboard snapshotEmbedding Dashboards
Reuse report sections across templatesSubreports

TaskRecipe
Compare temperature across devices with a line chartTemperature comparison report
Snapshot a dashboard into a PDFEmbed a dashboard in a report
Generate per-device alarm sections using subreportsDaily alarms subreport
Send a PDF alarm report with a notificationAttach a report to a notification