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.
Step 1. Create the subreport template
Section titled “Step 1. Create the subreport template”- Navigate to Reporting ⇾ Templates.
- Click + Add report template ⇾ Create new report template.
- Configure: • Name: Daily Device Alarms (Subreport). • Format: PDF. • Type: Subreport.
- Click Add to open the Report Builder.
- 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).
- Create a new entity alias:
- 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.
- Set the datasource:
- 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.
- Add a Divider component:
- Drag it below the Alarm table to visually separate one device section from the next.
- Save the component.
- Click Save in the top-right corner to save the subreport template.
Step 2. Create the master report template
Section titled “Step 2. Create the master report template”- Click + Add report template ⇾ Create new report template.
- Configure:
- Name: Daily Device Alarms Report.
- Format: PDF.
- Type: Report.
- Click Add to open the Report Builder.
- Add a Heading component — enter text:
Daily device alarms report.
- 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.
- Click Save in the top-right corner.
Step 3. Generate a test report
Section titled “Step 3. Generate a test report”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.