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
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?
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.
- New Director (MQTT Client) is added to system
- Ignition will automatically create tags for new director
- A script runs on a schedule that builds the list of directors in entire system (it will add new devices)
- Report will use this list to generate a report that captures Device metrics of each director