You can help by commenting or suggesting your edit directly into the transcript. We'll review any changes before posting them. All comments are completely anonymous. For any comments that need a reply, consider emailing training@inductiveautomation.com.
Version:
LESSON LIST
-
4:38Parameters
-
3:35Basic SQL Query
-
3:13SQL Query
-
1:20Named Queries in Reports
-
2:23Tag Historian Query
-
2:06Tag Calculation Query
-
2:29Alarm Journal Query
-
1:27Static CSV
-
5:42Scripting Data Source
-
4:10Nested Queries
Take Topic Challenge
LESSON
Named Queries in Reports
Description
Learn how to create and use a Named Query Datasource in a report.
Video recorded using: Ignition 8.1
Transcript
(open in window)[00:00] In this lesson, I'll show you how to use a named query as a report data source. I'll start in the Data tab of my report and when I create a new data source, I can choose Named Query. In order to use a named query, I'll need to select one from the Path field here. I'll click the magnifying glass icon and choose my named query. You can see that automatically brings in the query in any parameters since this is a named query, I can't modify the query from the report section. I'd have to go into the named queries area within the project browser. However, since I set up my named query with a parameter, I can pass different values to it for my report. If I select the named query parameter and click the magnifying glass icon, I can also select one of my report parameters to pass. I'll select my site parameter. Moving over to the right side of the screen, I can specify the data key for this data source in like most other data sources named queries can be used as part of a nested query system.
[01:07] If I head over to the Preview tab, my report has data from my named query. As you can see it's very easy to use a named query in your report and pass parameters to it.