Skip to content
© 2026 The ThingsBoard Authors
Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

Daily Alarm Report per Device Using Subreports

Build a recurring alarm report that covers a fleet of devices. You will create a subreport template that renders one section per device — showing the device name and its active alarms for the day — and a master report that runs that template across all devices in a single PDF.

  1. Navigate to Monitor ⇾ Reports ⇾ Templates.
  2. Click + Add report template ⇾ Create new report template.
  3. Configure:
    • Name: Daily Device Alarms (Subreport).
    • Format: PDF.
    • Type: Subreport.
  4. Click Add to open the Report Builder.
  5. Add a Rich text component:
    • Set the datasource:
      • Create a new entity alias:
        • Name: Entity from master report
        • Filter type: Entity from master report
        • Default master report entity: Device
      • Add the data key: name (Entity field type).
    • Include ${name} in the content to show the entity name as a section header.
      The following table lists the alarms of ${name} for the current day.
    • Save the component.
  6. Add an Alarm table component:
    • Set the time window to Current day.
    • Use Entity from master report alias as the alarm source.
    • Set the table heading to ${entityName} alarms.
    • Save the component.
  7. Add a Divider component:
    • Drag it below the Alarm table to visually separate one device section from the next.
    • Save the component.
  8. Click Save in the top-right corner to save the subreport template.
  1. Click + Add report template ⇾ Create new report template.
  2. Configure:
    • Name: Daily Device Alarms Report.
    • Format: PDF.
    • Type: Report.
  3. Click Add to open the Report Builder.
  4. Add a Heading component — enter text:
    Daily device alarms report.
  5. Add a Subreport component:
    • Datasource: create an entity alias that returns all Device-type entities.
    • Subreport template: select Daily Device Alarms (Subreport).
    • Save the component.
  6. Click Save in the top-right corner.

Click Generate test report in the top-right corner. The resulting PDF contains one section per device — each with the device name and its active alarms for the current day.