Reporting module - Nested Queries not displaying correctly


I have hit a problem with designing a report for a project I am working on and can use some advice

Problem: When using a nested query my preview does not show the same data as the raw

–Current Setup–
I have a single datasource that uses a SQL query to get a list of Directors (MQTT Clients) from a custom table in my SQL database

SELECT  DirectorList.Directorname as 'DirectorName' FROM DirectorList

Within the the same datasource I have a nested query using Tag Historian Query to grab specific historic data for each Director in the list

I have added to two Table components to the report
Table 1 data key = ‘Directorquery’
Table 2 data key = ‘Directorquery.history’

When viewing in preview mode I see the name of the director in the first table and I see data in the second table. However, that data in second table is duplicating the first row and does not show any other data. In the sample data the raw data shows the correct values.

Question: am I missing a configuration? or am I not using nested queries correctly?



—Extra info—
My final goal is to have a report that will automatically update if any new Director (MQTT client) is added to system. Without the need to go into designer to update the datasource for report.

  1. New Director (MQTT Client) is added to system
  2. Ignition will automatically create tags for new director
  3. A script runs on a schedule that builds the list of directors in entire system (it will add new devices)
  4. Report will use this list to generate a report that captures Device metrics of each director

Make sure Table 2 is a child table of table 1. When you have the child table selected, you only need that query’s name (‘history’ in your example), not the parent.subquery style of the name.


I got it working I made the mistake of treating them as separate tables instead of utilizing tablegroup.