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

LESSON LIST

Autoplay Off
Take topic challenge

Description

Learn how to create different row versions for your tables to use. Add an alternate version that will be used every other row, or use the Version Key property to select a row version based on an expression.

Video recorded using: Ignition 7.9

Transcript

(open in window)

[00:00] Let's talk about row versioning. When using a table in a report, it's possible to have each row look different. As you can see, we have a report set up. And if we click on the Design tab, it's already making use of a table. Let's go ahead and double click on the Details row. When you do, you see the row version to the right hand side of the row. Currently, Standard, which is the default row version, is selected. If we click on Standard, you'll see that we have some options to create a new row version, as well as remove existing ones. I'm going to go down to Add Alternate. And you can see on the row, Alternate is currently selected. The way Alternate works is that the table will alternate between the Standard row version and the Alternate row version. To give you an example of this, we'll go ahead and apply a color to the entire row. I'm going to come up to my Project Browser, and I'm going to select the Downtime Minutes Details, or the Details row, because, again, I want this to be applied to the whole row. Then we come down to the Property Inspector. We'll scroll down, and under Stroke and fill, there's a Fill property. I'm going to set that to True. And then under Fill Color, I'm going to go ahead and pick a color. Let's do a nice green color. There we go. Now, if we go and take a look at the Preview tab, you can see that our Alternate row version is already working. The table starts at Standard, goes to the Alternate, back to Standard, et cetera, et cetera. Now, let's try something a little more complicated. Let's say we want the row version used for each row to be dependent on a value in that row. Specifically, if our weekly downtime for a line is greater than 40 minutes, let's go ahead and use a different row version. So, I'm going to come back to Design, and I'm going to double click on the Details row. Now, it's possible to have multiple row versions all configured and working together, but, to keep this simple, I'm going to go ahead and remove our Alternate row version. So, I'm going to click on where it says Standard, on the right-hand side. I'm going to select the Alternate, so you can see it's visible, and that's clearly selected now. And I'm going to click here again, and click on Remove. Now Alternate is gone. So, let's come down to Custom. And let's give this one, we'll call this one High, the minutes are higher than 40. Click Okay. You can see that High is currently selected for the row. Now, just like last time, I'm going to come up to the Project Browser, I'm going to click on my Details row, and the Property Inspector. I'm going to scroll down to Stroke and fill. I'm going to set Fill to True. I'm going to pick a color. Let's do red this time. There we go. Now, the next part is the interesting part. I'm going to go ahead and pop out the Property Inspector, just so you can get a better view of what I'm doing here. Now, there is this property called Version Key. The Version Key property is what's going to allow us to conditionally select which row version to use. So, for example, I'm going to double click here, and we want to look at our Downtime Minutes, and if they're greater than 40. If they're greater than 40, we want the use of the High row versioning, or our new one we just created. Otherwise, let's use the Standard one. And hit Enter to go ahead and commit that. And we'll put the Property Inspector back in. There we go. Now, if we come to the Preview tab, we see it worked. So, all the lines with a weekly downtime less than 40 are using the Standard row versioning, and everything greater, all the lines with the weekly downtime greater than 40, are using the High row versioning.

You are editing this transcript.

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