- Overview
- Video tutorial
- Reports Server
- Generate Report from Dashboard
- Generate Report by schedule
- Generate Report Rule Chain
- Reports Widget
- Next steps
Overview
ThingsBoard allows you to generate reports using existing dashboards.
Reports can be generated either from the currently opened dashboard or scheduled using the Scheduler capabilities.
Video tutorial
See video tutorial below for step-by-step instruction how to use this feature.
Reports Server
The Reports Server is a standalone service used to generate reports by rendering dashboards in a headless browser.
On each generate report request, ThingsBoard node sends a request to the Reports Server using the configured endpoint URL.
The Reports Server opens a web page with the target dashboard URL in the headless browser and waits until the page renders, then it captures the dashboard web page into the specified format (PDF | PNG | JPEG) and sends the captured data as a response to ThingsBoard.
The system administrator can configure the Reports Server endpoint URL using thingsboard.yml.
The following is a sample configuration:
1
2
3
4
# Reports parameters
reports:
server:
endpointUrl: "${REPORTS_SERVER_ENDPOINT_URL:http://localhost:8383}"
Generate Report from Dashboard
The Tenant Administrator or Customer User can generate a report from the currently opened dashboard.
- Click the Export Dashboard button located at the right side of the dashboard toolbar
- In the expanded drop-down menu, select the desired dashboard export option
- The report generation will start.
- And finally, the report file will be automatically downloaded in the format selected.
Generate Report by schedule
Report generation can be invoked by a schedule using the Generate Report Scheduler Event.
Generate Report Rule Chain
Scheduled reports generation is supported by the default Root Rule Chain of ThingsBoard PE. By default, a message of type Generate Report is routed to the Generate Report Rule Chain.
The Generate Report Rule Chain has a Generate Report Rule Node that performs the report generation according to the report configuration retrieved from the message body.
If the message body has a field sendEmail
and its value is set to true
,
the message with a report file reference in the attachments
field of the metadata will be routed to the email related Rule Nodes.
The Email Rule Nodes will prepare the email message with a report file in the attachments and send it to the configured recipients.
Reports Widget
ThingsBoard provides access to the generated report files via the Reports Widget that is a part of the Files Widgets Bundle.
The widget has the ability to filter the reports using the time range component.
Also, the widget has the ability to search the reports by name.
Each report can be downloaded by clicking on the Download file button.
Next steps
-
Getting started guides - These guides provide quick overview of main ThingsBoard features. Designed to be completed in 15-30 minutes.
-
Installation guides - Learn how to set up ThingsBoard on various available operating systems.
-
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.