I have a Named Query that I use to populate a Power Table, and I’d like to reuse it in an Ignition report. To do that, I open a report window via a button click and pass the selected date from a Calendar component into the Report Viewer. The date parameter shows correctly in the report header, but it’s the only data that appears. None of the query results show up.
In my report, I’ve added the Named Query as a Data Source and bound its dayStart
parameter to {reportDate}
, which is also displayed in the report header. I then dragged each field from the query under “Objects Details,” but the table remains empty except for the date.
(See the attached screenshot for my current setup.)
I'm assuming I went astray somewhere.
Don't use fully-qualified data keys in the table rows. Just the column names between @
symbols.
Sadly, dragging from the data key browser does the wrong thing. (Has for a long time.)
I removed all the "named_query." from my keys and just have @Hour@ for example. I'm still not seeing any data for any date.
Did you connect the table's own data key to your query?
Yeah, I have {reportDate} as the value for my dayStart Parameter if that's what you mean.
No, I meant in the Design tab, in the table component's properties.
No, that would probably be my issue then. Where exactly in the properties would I do that.
Sorry I didn't see that mentioned in the Named Queries video.
Edit: I just added named_query to my Data Key list in my Configure Table tab if that's right.
Thank so much. I got it. I had named_query in Grouping and NOT set at the Data Key. I set it as the data key and it deleted everything I had entered and I have to completely reformat my Report but I tested with @Hour@ and I see the data.
Thanks again.
1 Like