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:
Supplemental Videos
LESSON
Reports in Vision Clients
Description
The Report Viewer component is used to view a Reporting module report on a Vision module window. This lesson demonstrates how to use the component.
Video recorded using: Ignition 8.0
Transcript
(open in window)[00:00] In this lesson, we'll take a look at showing a Reporting Module Report on a screen in the Vision Module. You can see I am working on a report right now. I have a text shape that's actually utilizing a couple of different parameters. So if we head over to the Data tab here, we can see I have my StartDate and EndDate parameters that are there by default. And then I have this new parameter called MyParameter. And again, it's a very simple report, I go back to the Design tab. I'm simply showing off the value of those keys in that text shape. So I would like to show this off on one of my Vision Module windows. Let's head up to the Vision section of our Project Browser. And under Windows, I do have a main window ready to go. So the way you show off a report on a window in the Vision Module, if you head over to the Component Palette here, under the Reporting section, there's a component called the Report Viewer component. This component is used to visualize reports on Vision Windows. So I'll drag this onto my window here and you can see we get a little warning here, because we need to specify a Report Path. So with that component selected, if you take a look down at the Vision Property Editor here, under the Data category there's a Report Path property. This would be the path to the report you wanted to show including any folders that were in the path. Now, don't type here, instead, there's a little chevron you can click on. This property's actually a drop-down and it will show you all of the reports that are available to this one project. So we'll select My Simple Report there. And you can see that is actually loading my report. Now you may have noticed this as well when you're looking in the Property Editor. As soon as I pick my report, we gain these Report Parameter properties. So the way this component works is that if there's any parameters defined on a report, we'll show them here in the Property Editor. This allows you to bind these properties to other components or otherwise change them. Now you can see that I'm showing No Date and then my parameter's just coming up blank. When you see it like this, it means that it's using the default value for these parameters. So I could come over here and statically type in a number. And you see over here, that is now showing a number of 100. This also means that if I wanted to change the start date and the end date, I could simply add some sort of calendar component to the window. So if I were to head up to the Component Palette here, and if we were to take a look at the Calendar category, we can expand this and I'll grab a Date Range component, drag that onto my window here and with that component selected, this has a Start Date and an End Date. So we could actually just bind the properties on the Report Viewer, the Start Date and the End Date parameters, to my Date Ranges, Start Date and then Date Properties. So we'll select the Report Viewer component and I'll start with these Start Dates. Now be mindful here, the report parameters here are always in alphabetical order, whereas the Date Range component here, begins with the Start Dates. So you want to make sure you line the two properties up. So again, back to the Report Viewer components, the Start Date property, we'll Bind. We'll do a simply Property Binding here. And we're on the Report Viewer, so we want to select the Date Range or rather, expand the Date Range. Find it's Start Date property and hit OK. And then we'll do the same thing with the End Date parameter with the little binding icon. Again, we'll do a Property Binding to the Date Range components and we'll grab the End Date and hit OK. Now of course we can test this out. You can already see that it's showing different dates. But if I put this into Preview Mode here, I start moving that slider around, picking different dates, you'll notice that they're being updated automatically. And of course because our data sources can utilize parameters, this is a very easy way for you to place a report somewhere, allow your users to pick some parameters and then they can generate their own report. Lastly, this component, if you're in the Designer in Preview Mode or if you right-click on it from the client, it give you this little right-click menu, allowing you to generate a document out of your report. Additionally the component has some built-in Python functions you can call that also generate documents. For more information, take a look at the Report Viewer component in the User Manual.