- Prerequisites
- Step 1. Create the report template
- Step 2. Adding report components
- Step 3: Scheduling the report for customers
- Step 4. Scheduled events result
- Next steps
- Your feedback
Available since TB Version 4.2 |
In ThingsBoard, Reporting is a powerful and flexible tool for collecting, organizing, and automatically delivering data in the form of reports.
The reporting system is built around two key components:
- Report Template – defines the structure, content, and format of a report. A template can be in PDF or CSV format and include any supported components
- Scheduler Event – automatically triggers report generation at a specified time and delivers it to selected recipients through available channels, such as email, Slack, or other integrations.
In short: the template defines what will be in the report, while the scheduler determines when and to whom it will be delivered.
In this guide, we'll walk through the basic steps of using Reporting in ThingsBoard, and create one report template with automated delivery configured for two different customers.
Prerequisites
You will need access to ThingsBoard Professional Edition. The easiest way is to use ThingsBoard Cloud server. Alternatively, you can install ThingsBoard using the installation guide.
Important:
- For this example, three devices and two customers who own these devices have been created. Alarms have also been triggered on some of the devices. You'll need to do the same — otherwise, the device and alarm tables in your report will appear empty.
- If you're just getting started with the ThingsBoard platform, I recommend first reviewing the Getting Started Guide with ThingsBoard Professional Edition.
Step 1. Create the report template
As an example, let's create a report template that includes:
- A table with all customer devices, displaying each device's latest telemetry values and current status.
- A table listing all alarms triggered on those devices during the current day.
This setup gives you both an up-to-date overview of device conditions and a quick reference for any issues detected today — all in one consolidated report.
- Open the “Reporting” page from the left-hand sidebar. You'll automatically be taken to the “Templates” tab.
- Click the “+ Add report template” button in the top-right corner.
- Choose “Create new report template”.
- In the popup, fill out the following:
- Name it “Daily Device Alarm Report”.
- Choose PDF report format.
- Choose Report as the template type.
- [Optional] Description: “Daily report on device activity and their alarms”.
- Click “Add” to create the report template and open the Report Builder interface.
In the Report Builder you can design the structure, layout, and content of your report.


- Name it "Daily Device Alarm Report".
- Choose PDF report format.
- Choose Report as the template type.
- Click "Add" to create the report template and open the Report Builder interface.
Step 2. Adding report components
The Report Builder allows you to add and configure components that define the structure and visual layout of your report.
Components are added by dragging them from the components library into the content area.

Step 2.1 “Heading” component
First, let's add the “Heading” component. Locate it in the report component library and drag it into the header content area of your report.
In the editor, under the Text field, type the title you want for the heading. In this example, we'll name it the same as the report template: “Daily Devices Alarm Report”.
If desired, you can adjust font settings such as size, style, or alignment to make your title stand out. Once done, click “Apply” to save the component.


Step 2.2 “Rich text” component
Next, let's add the “Rich text” component, which will contain a brief explanation of the report's purpose.
- Locate the Rich text component in the component library and drag it into the content area.
- Enter the following text (or your preferred description) into the component:
For example:
This report provides an overview of all customer devices, their latest telemetry, status, and a list of alarms triggered today.
- Once you've added the text, click “Apply” to apply the changes.


Once you've added the text, click "Apply" to apply the changes.
Step 2.3 “Entity table” component
The next component we'll add is the “Entity table” — a table-style component that will display a list of all your devices along with their latest telemetry values and status.
Next, we'll add the “Entity table” component. This table will display a list of all your devices, along with their latest telemetry values and status.
- Drag & Drop the “Entity table” component from the component library into the content area.
- In the “Datasource” section, create a new entity alias that retrieves all your entities of type Device.
- Enable the table heading and update the heading text.
- In the Columns section:
- Add a new column and set the key to “temperature”.
- Add another column with the telemetry key “humidity”.
- Add one more column for the attribute “active”, which will display the device's status.
- Click “Save” component to apply your changes.






Step 2.4 “Alarm table” component
The final component we'll add is the Alarm Table, which will display a list of alarms for the selected period.
- Drag the “Alarm table” component into the content area of your report.
- Set the entity alias “All devices” as the alarm source.
- Scroll down and enable the table heading. Enter your heading text. For example:
The following table lists all alarms for your devices from the last day.
- Adjust the horizontal alignment and reduce the font size if desired.
- Keep the table columns as they are (no changes needed).
- Save the component.



Step 2.5 Save the report template and preview
After you've added and configured all the necessary components, update the report file name to the one you need.
Click “Save” in the top-right corner to store your template configuration.

To make sure your template is set up correctly and data displays as expected, click “Generate test report” (located next to the “Save” button). The system will generate a test report showing all your devices along with their alarms.


Step 3: Scheduling the report for customers
Now that the Daily Devices Alarm report template is ready, you can set it up for automatic delivery to your clients using the scheduler feature.
Key points for correct scheduling
To ensure the report is generated correctly and contains accurate data, you must specify:
- Report recipients – the users who will receive the generated report (e.g., managers or clients).
- User account – the account under which the report will be generated. This defines the data scope and permissions applied to the report.
Why this matters
In ThingsBoard, reports are generated according to the access rights of the user account that triggers them.
Example:
- If the report should include only devices owned by Customer A, you must set the User field to the email address of a user belonging to Customer A when scheduling the report.
- Likewise, to schedule a report for Customer B recipients, use the email address of a Customer B user in the User field.
This ensures the report will only display devices and data accessible to that specific user.
Step 3.1 Scheduling a report for Customer A users
First, we'll set up automated delivery of the report for all Customer A users. The report will be generated on behalf of Jane Smith, the administrator for this customer.
- Go to the “Scheduling” tab on the “Reporting” page and click the “+ Scheduled Report” in the top-right corner to create a new scheduler event. In the scheduling dialog:
- Name – give your schedule a clear title, e.g., Daily Devices Alarm Report for Customer A.
- Event type – always set to Create report.
- Report template – select the previously created Daily Devices Alarm Report template.
- User – specify the user account on whose behalf the report will be generated: [email protected] (Jane Smith — Customer A administrator).


. – Select the previously created Daily Devices Alarm Report template.
– Specify the user account on whose behalf the report will be generated: [email protected] (Jane Smith — Customer A administrator).
- Set the recipients:
- In the “Recipients” field, click Create new to create a new recipient group.
- Enter a name for the notification recipient group.
- Select Customer users filter.
- Set Customer to Customer A.
- Click “Add”.
- In the “Recipients” field, click Create new to create a new recipient group.
- Notification template & delivery methods:
- Select an existing notification template (defines how the report will be delivered) and edit it.
- Add Email as a delivery method alongside Web. Click “Next”.
- Add the subject and body text for the email notification to which the PDF report will be attached. Click “Save”.


- Select Customer users filter.
- Set Customer to Customer A.
- Click "Add".



Set up the schedule
- Go to the Schedule tab.
- Start time – set the date and time of the first run.
- Time zone – choose the applicable time zone.
- Enable Repeat:
- Interval – select Daily.
- End date – set an end date or leave blank for ongoing delivery.
- Finally, click “Create” to save and apply the scheduler event.
Now, every day at the scheduled time, all Customer A users will automatically receive a report with the latest information about their device alarms.


Step 3.2. Scheduling a report for Customer B users
Now let's create another schedule event to send the report to Customer B's users. This report will be generated on behalf of Emma Johnson — the administrator of this customer.
- Click “+ Scheduled report” in the top right corner of the “Template” page to create a new scheduler event.
- Give your schedule a descriptive name, for example: Daily Device Alarm Report for Customer B.
- Select the same template used for Customer A — Daily Device Alarm Reportv.
- Set the user account to [email protected] (Emma Johnson – Customer B Administrator).
The report will be generated on behalf of this user, containing only the data accessible to Customer B.
- In the “Recipients” field, click “Create new” to create a new recipient group.
- Name: Enter a group name.
- Filter: Select Customer users.
- Customer: Set to Customer B.
- Click “Add”.
- Use the existing notification template that is already configured to send messages via Email and Web.
- Set the delivery schedule the same way as for Customer A:
- Start date/time: Specify the date and time of the first run.
- Repeat: Enable this option.
- Interval: Select “Daily”.
- End date: put the schedule's end date.
- Finally, click “Create” to save the scheduler event.


- Select the same template used for Customer A — Daily Device Alarm Report.
- Set the user account to [email protected] (Emma Johnson – Customer B Administrator). The report will be generated on behalf of this user, containing only the data accessible to Customer B.


- Select Customer users filter.
- Set Customer to Customer B.
- Click "Add".


- Specify the date and time of the first run.
- Enable the "Repeat" option, select
Daily</b> as the interval, and put the schedule's end date.
- Finally, click "Create" to save the scheduler event.

Step 4. Scheduled events result
Both scenarios use the same template — Daily Device Alarm Report.
Each user from both customers receives their own individual report containing only the entities they have access to.
The system automatically sends the reports daily at the scheduled time, without any manual intervention.
At the time specified in the scheduled events, all users of Customer A and Customer B will receive notifications along with the generated report on their device alarms.
Notifications will be delivered through two channels:
1. Web UI notification
- A notification about the generated report will appear in the ThingsBoard Web UI.
- Tenant Users can open the report directly within the ThingsBoard interface.
Important:
- Only Tenant Users can view generated reports directly in the ThingsBoard Web UI.
- Customer users do not have access to reports in the Web UI — they can only receive them through Email or Slack.
If your recipients are customer users, make sure at least one of these delivery channels is selected.
2. Email notification
- An email will be sent to the user with the subject and message you configured in the notification template.
- The email will have the report attached as a PDF file, which can be opened and viewed in the browser or downloaded.



Next steps
-
Connect your device - Learn how to connect devices based on your connectivity technology or solution.
-
Data visualization - These guides contain instructions on how to configure complex ThingsBoard dashboards.
-
Data processing & actions - Learn how to use ThingsBoard Rule Engine.
-
IoT Data analytics - Learn how to use rule engine to perform basic analytics tasks.
-
Hardware samples - Learn how to connect various hardware platforms to ThingsBoard.
-
Advanced features - Learn about advanced ThingsBoard features.
Your feedback
Don't hesitate to star ThingsBoard on github to help us spread the word. If you have any questions about this sample, please contact us.