Version:

This lesson is part of the Reporting in Ignition course. You can browse the rest of the lessons below.

Supplemental Videos

LESSON

Reports in Perspective Sessions

Description

Learn how to embed your reports directly in a Perspective Session.

Video recorded using: Ignition 8.0

Transcript

(open in window)

[00:00] In this lesson, we'll take a look at the prospective report viewer components. The report viewer is a component designed to render a reporting module report directly in a prospective session. We'll begin in the designer, I have an empty view in front of me. I'll head over to the component pallet here and under the reporting category of components I have a report viewer component, which I wall drag onto my view here. And we can tell from the warning here that we're missing a valid report for the source property. So the source property, right over here, represents a path that leads to a report that exists inside of this same project. Now, if I head over to the project browser we can use the component to render any of the reports that exist here under the reports workspace, including inherited reports. Now, I'm going to switch down to this downtime report here. So I'm going to select it once so the workspace changes. I'll give it a little double-click to open it up. We can see it's a pretty basic-looking report. It has some charts, a table, and a text shape. This same report has, if I head on over to the data tab here, a parameter called Title with a capital T. This title property is going to be important later when I show you how to change the value of parameters from the report for your component. I'm going to select this report in the project browser here. And I'm actually going to right-click on it and copy the path to it. We'll just paste this over into the source property on the Report Viewer component. So I'll copy the path, we'll head back to our Report Viewer in the perspective workspace here. And again, with the Report Viewer selected I'll head over to Source and I'll just right-click and paste and it'll load our report. I'm going to re-size this here. I'm going to Save my project. Off-camera here, I do have a browser open which I'll bring on over into view here. With this Report Viewer component, if you look down at the bottom of the component, we do have this little control bar here. Let's go over each of the little items in the bar here. To just quickly talk about each item in the bar here, on the left-hand side we do have the little drop-down here which effectively allows you to change the zoom level of the report here. So if you wanted your report to zoom out showing more of the available page on the report, that's a little too far out, we'll zoom in a bit more. We do have some pagination controls down below here allowing you to cycle two different pages in the report. And then we have these two buttons in the lower right-hand corner. So starting with the little cloud icon here, this is simply a download button. If you click on that, it'll generate a PDF copy of your report and then your browser will attempt to save or ask you what you want to do with it depending on how you have that configured in your browser. I'm going to x out of this. The last icon here will open a new tab in your browser. Basically it allows you to just show the entirety of the report in a separate tab. Now I'm going to move this back out of the way. Let's take a look at some properties on the component here. Again, with the components selected, we talked about Source, we'll come back to params here. A lot of the Control properties that I just talked about are actually represented as Properties on the component. So if you wanted to change the page, or the currently viewed page, you could do that as a property here. So you could have a script or binding, change the Current Page or component. We do have the Page Count property here which you might think is a little weird that this is actually an editable property. But realistically, even if you look at the tool tip here, it's actually just a read-only property. So the idea here with Page Count is if you needed other components on the view, to be mindful or aware of how many pages are on the report here you could simply reference Page Count. We just talked about the zoom level here which, of course, is represented as a property. So we could change it from here. And then we do have Allow Download and Allow Open a Tab which are basically just whether or not you want to see those little buttons in the lower right-hand corner. If you didn't want anyone downloading a copy of the report, you'd simply turn those off. Now heading up to Parems here, I talked about that title property that exists on this down-time report which of course right now is actually setting the title there on the report. So if you wanted to override the value of a report parameter using this component, all you need to do is come over to the Parems object here. I'm going to add a new object member. I'll add a value. You want the key to match the name of the parameter. I'm going to type in Title with a capital T here. If I tab over, hit Enter, you'll notice after a moment it does update and now it says value which just happens to match the value on this particular property. Of course if I change this to something else, you'll notice that it then updates on the report. So if you wanted to make a dynamic Ad Hoc report where the underlying data changes depending on user input, you would make a report that utilizes report parameters, add those parameters as members under this parems object here, and then use Bindings or Script to change the value of the members. And with that, now you have a solid idea how to add reports to your perspective sessions.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.