As nice as some things are in the reporting, I’ve been struggling with getting some important things accomplished to finish a single report.
We have a report where we are using a single data source that first uses a SQL query to get out each Oil Well that has a gas meter device installed. This is to generate a report that has a each well on it’s own page. Then we nested a couple of Tag Historian queries to generate both a time weighted and max aggregate with an interval of 24 hours (makes the report have a month’s worth of data (a day on each row).
How do you get two different Tag Historian queries (data keys) in one tables details section? We have a Table group already for different sections of data, but I want to display the max and time weighted average on the same table next to each other (see second picture below, column “Flow Time”). That column will display only the first well’s result and repeat the same for every well. Disregard the two columns with “N/A” since those I left out.
**I was able to do this in a inefficient fashion by putting a child nested query to an existing nested query, but this generates the extra query every time for each query row in the query it’s under, so it basically compounds unnecessarily, producing thousands of extra rows of data as seen in the xml in preview.
Second question, I found out from AI support that there’s a bug since version 7.9 that nested queries don’t display “calculations” and am unable to do total, average, max, min, etc… (Note, we first used a sql query to narrow down the wells that we need, then used tag historian queries with aggregates). The parent query will display calculations, but not the nested. Is there anyway around this? We have gotten into scripting a data source, and were able to get these calculations of columns, but since it’s a separate data source, we are unable to get it to tie in and group nicely with the original data source. Also, seems like it would have been nice to put a script query option under the nested queries.