Wiki source code of Report Guide
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
6.1 | 1 | (% class="wikigeneratedid" %) |
2 | Table of contants: | ||
3 | |||
4 | {{toc/}} | ||
5 | |||
6 | |||
![]() |
13.1 | 7 | = **1. Overview** = |
![]() |
2.1 | 8 | |
![]() |
4.1 | 9 | In ThingsBoard, **Reporting** is a powerful and flexible tool for collecting, structuring, and automatically distributing data in the form of reports. |
![]() |
2.1 | 10 | |
![]() |
4.1 | 11 | Reporting in ThingsBoard is built on two key components: |
![]() |
2.1 | 12 | |
![]() |
4.1 | 13 | * **Configured report template** – defines the structure, content, and format of the report. A template can be in **PDF** or **CSV** format and may include any supported components, such as tables, charts, text blocks, images, and more. |
14 | * **Scheduler event** – automatically triggers report generation at the specified time and sends it to selected recipients via available delivery channels (such as **email**, **Slack**, and other integrations). | ||
![]() |
2.1 | 15 | |
![]() |
4.1 | 16 | **Key features:** |
![]() |
2.1 | 17 | |
![]() |
4.1 | 18 | * **Automated scheduling** – preconfigured scheduler events can send reports on a set schedule without any user action. |
19 | * **Reusable templates** – a single template can be used for different recipients by applying filters and parameters. | ||
20 | * **Event-based delivery** – send reports when specific events occur (e.g., an active alarm on a device). | ||
21 | * **Rich content support** – include text blocks, tables, charts, images, and more. | ||
22 | * **Notification integration** – attach a generated report to system notifications (Email, Slack). | ||
![]() |
2.1 | 23 | |
![]() |
4.1 | 24 | **Where it's useful:** |
![]() |
2.1 | 25 | |
![]() |
4.1 | 26 | * Regular monitoring of your device's metrics. |
27 | * Sharing summary data with partners or management. | ||
28 | * Archiving data in an easy-to-read format. | ||
29 | * Automating communication during incidents. | ||
![]() |
2.1 | 30 | |
![]() |
13.1 | 31 | **Report format:** |
![]() |
2.1 | 32 | |
![]() |
4.1 | 33 | * **PDF** – visually styled reports that may include charts, tables, images, and company branding. |
34 | * **CSV** – data-oriented tabular reports that are easy to analyze in Excel or BI tools. | ||
![]() |
2.1 | 35 | |
![]() |
4.1 | 36 | **Demo:** |
![]() |
2.1 | 37 | |
![]() |
13.1 | 38 | [[image:1757901233737-956.png||_mstalt="297427" height="405" width="720"]] |
![]() |
4.1 | 39 | |
![]() |
6.1 | 40 | |
![]() |
13.1 | 41 | [[image:1757901251979-243.png||_mstalt="296179" height="1021" width="722"]] |
![]() |
4.1 | 42 | |
43 | |||
![]() |
6.1 | 44 | ---- |
![]() |
4.1 | 45 | |
![]() |
13.1 | 46 | = **2. How to generate a simple report** = |
![]() |
6.1 | 47 | |
![]() |
13.1 | 48 | == **2.1 Creat report** == |
![]() |
11.1 | 49 | |
![]() |
7.1 | 50 | * ((( |
51 | Open the “**Reporting**” page from the left-hand sidebar. You'll automatically be taken to the “**Templates**” tab. | ||
52 | ))) | ||
![]() |
4.1 | 53 | * Click the “**+ Add report template**” button in the top-right corner. |
54 | * Choose “**Create new report template**”. | ||
55 | * In the popup, fill out the following: | ||
56 | ** **Name** – a descriptive name for the report template. | ||
57 | ** **Format**: Choose **PDF** or **CSV** report format. | ||
![]() |
13.1 | 58 | ** (% _mstmutation="1" %)**Type**(%%): |
![]() |
4.1 | 59 | *** **Report** - a complete standalone report template. |
60 | *** Subreport - a modular component that can be embedded inside another report. | ||
61 | ** Click “**Add**” to create the report template and open the **Report Builder** interface, where you can design the structure, layout, and content of your report. | ||
62 | ** Open the “**Reporting**” page from the left-hand sidebar. You'll automatically be taken to the “**Templates**” tab. | ||
63 | ** Click the “**+ Add report template**” button in the top-right corner. | ||
64 | ** Choose “**Create new report template**”. | ||
65 | |||
![]() |
13.1 | 66 | [[image:1757899242101-256.png||_mstalt="294606" height="245" width="711"]] |
![]() |
2.1 | 67 | |
![]() |
5.1 | 68 | * In the popup, fill out the following: |
69 | ** **Name** – a descriptive name for the report template. | ||
70 | ** **Format**: Choose **PDF** or **CSV** report format. | ||
![]() |
13.1 | 71 | ** (% _mstmutation="1" %)**Type**(%%): |
![]() |
5.1 | 72 | *** **Report** - a complete standalone report template. |
73 | *** Subreport - a modular component that can be embedded inside another report. | ||
74 | ** Click “**Add**” to create the report template and open the **Report Builder** interface, where you can design the structure, layout, and content of your report. | ||
75 | |||
![]() |
13.1 | 76 | [[image:1757899267136-753.png||_mstalt="298441" height="435" width="712"]] |
![]() |
5.1 | 77 | |
78 | |||
![]() |
2.1 | 79 | ---- |
80 | |||
![]() |
13.1 | 81 | == **2.2 Report Builder** == |
![]() |
2.1 | 82 | |
![]() |
5.1 | 83 | The **Report Builder** is a drag-and-drop editor that lets you design your report template using visual and data components. You have full control over both the appearance and structure of the report. |
![]() |
2.1 | 84 | |
![]() |
9.1 | 85 | Each component has two main configuration sections: |
![]() |
8.1 | 86 | |
![]() |
9.1 | 87 | * **Data configuration** — defines which data the component will display and how it will be filtered. Supports entity aliases and filters for dynamic data binding. |
88 | * **Layout configuration** — controls the visual style and formatting in the final document. | ||
![]() |
8.1 | 89 | |
![]() |
5.1 | 90 | Here's what the Report Builder looks like: |
91 | |||
![]() |
13.1 | 92 | [[image:1757900905980-599.png||_mstalt="299195" height="660" width="715"]] |
![]() |
8.1 | 93 | |
![]() |
9.1 | 94 | ---- |
95 | |||
96 | * In the **Report Builder**, add a component (for example, Rich text) and, in the “**Data**” tab, specify its data source (target entity and data keys). | ||
97 | |||
![]() |
13.1 | 98 | [[image:1757904337253-670.png||_mstalt="295282" height="492" width="722"]] |
![]() |
9.1 | 99 | |
100 | |||
![]() |
13.1 | 101 | [[image:1757904522206-991.png||_mstalt="295672" height="342" width="724"]] |
![]() |
9.1 | 102 | |
103 | * Next, in the component's text field, type the symbol where you want to insert a variable's value. This will open a list of all available variables in the current context. | ||
104 | |||
![]() |
13.1 | 105 | [[image:1757904586368-737.png||_mstalt="299325" height="376" width="718"]] |
![]() |
9.1 | 106 | |
![]() |
10.1 | 107 | * **Select variables** (for example, ${humidity}), and its value will be inserted into the report during generation. |
![]() |
9.1 | 108 | |
![]() |
13.1 | 109 | [[image:1757904657842-206.png||_mstalt="295763" height="482" width="716"]] |
![]() |
9.1 | 110 | |
![]() |
10.1 | 111 | * When finished, click the “**Save**” button in the top-right corner to apply your changes. |
![]() |
9.1 | 112 | |
![]() |
13.1 | 113 | [[image:1757904729910-988.png||_mstalt="299598" height="405" width="716"]] |
![]() |
9.1 | 114 | |
![]() |
11.1 | 115 | * And so on, continue to add other components |
116 | |||
![]() |
13.1 | 117 | [[image:1757904996853-139.png||_mstalt="298844" height="484" width="720"]] |
![]() |
11.1 | 118 | |
119 | |||
![]() |
13.1 | 120 | [[image:1757905097135-701.png||_mstalt="294450" height="573" width="716"]] |
![]() |
11.1 | 121 | |
122 | |||
![]() |
10.1 | 123 | ---- |
![]() |
9.1 | 124 | |
![]() |
13.1 | 125 | == **2.3 Generate report** == |
![]() |
11.1 | 126 | |
![]() |
10.1 | 127 | To verify the result, generate a test report sample by clicking the corresponding button in the top-right corner. |
128 | |||
![]() |
13.1 | 129 | [[image:1757905171500-699.png||_mstalt="296634" height="572" width="709"]] |
![]() |
11.1 | 130 | |
131 | |||
132 | **Demo:** | ||
133 | |||
![]() |
13.1 | 134 | [[image:1757905724919-410.png||_mstalt="295191" height="991" width="711"]] |
![]() |
11.1 | 135 | |
136 |