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

LESSON LIST

Autoplay Off

Description

Learn how to group larger datasets to create categories for the rows inside the Table object in the Report Designer.

Video recorded using: Ignition 7.9

Transcript

(open in window)

[00:00] When using a table in our report, it's possible to group the data in the table by a specific column. So, I have a downtime report set up here. I have a piece of equipment, or the name of the equipment. I have the downtime cause. Number of seconds it was down, and then the timestamp. Now, if we look at the design section here. I got to get my table set up. I have a single data source called data. And with the table selected, you can see that the data key is that same data source. So, what I would like to do, is go ahead and have the table sort each row by equipment. So, group up all the equipment together. So, we'll come to the property inspector and where it says grouping, to the right hand side, there's this little plus icon. You're going to click on that. And we'll go ahead and select our equipment row. Come down, click okay. So, that did a couple things. First, under groupings, you see equipment is listed. And we also have an equipment details row in our report. So, if we take a look at a preview, we don't have to do anything else. It's already sorting by equipment name now. So, you see conveyor line's together, motor's together, and pallet wrapper and palletizer. Let's go ahead and add some formatting to this though. I don't need to list the equipment name for each row. So, we'll go to the design tab, and where it says equipment here, I'm going to go ahead and just... Cut, I'm going to go ahead and cut that out and... Paste that up top here. And come back to preview. Looks a little bit better. But let's add some headers to this. So, if we come back to the design tab, with the table selected, and we'll go down the property inspector, we'll scroll down, and we can actually add a header and a summary to both of our groups. So, for equipment and data. I'm going to go ahead and do that right now. And let's add some headers. So, we'll start with the equipment header. We'll just type in-- Equipment name. And we'll make that bold, just so it stands out little bit. And then, let's add a... Let's add some headers for our data rows. So, for data header, we'll go ahead and... Right above cause we'll type cause. And duration, we'll do duration. And we'll go ahead and give it time, for our timestamp. If we take a look at the preview, you'll see we have our equipment name. That's at the very top. And then we have our cause, duration, and time for each piece of equipment. Which is good, it's what I'm looking for. Next, let's go ahead and add a total duration for each piece of equipment, and list that within that equipment's section of our report. So, let's come into the design section. And we'll go ahead and select our table, and we'll come to key browser and we'll make sure show calculations is set to true, because we're going to use that little total key. And we'll come down under our data source, we'll go to under duration. We're going to have total here, we'll click, drag, and drop right under duration. And if you select that you'll see it's just total duration. And we'll go ahead and add some... We'll add seconds. Just so it shows up as seconds there. We'll come to the preview tab. And you'll see it says total number here, in seconds. So, it does that for each... Piece of equipment, which is good. Now, let's go ahead and let's add a... Let's add an overall total. So, a total for everything. All, all... Pieces of equipment combined. So, we'll go to design. Now, I'm going to go ahead and just take this same text here. I'm going to copy this over and just paste that into our equipment summary row. And, we'll make this one bold, just so it stands out a little bit. But you can see... So, it shows up in the bottom here bold, but it shows a different number than it did for each one of these... For each piece of equipment. That's because the same... The same key, the same text, is just locating the equipment summary. So, it's doing an overall summary for everything. Whereas, in our data summary, that's just looking at each individual piece of equipment, 'cause remember, this data section here is just grouped up by each piece of equipment. So, very important to note that where you place your keys does impact what's being shown in the report. Let's go ahead and add one more grouping to our report. This time by cause. I'm going to come down to the property inspector. And we click on the plus icon. And I'm going to go ahead and click on cause here, click okay, and if you don't do anything else, come to the preview tab, you'll see that it's not exactly doing what I want. It is grouping up each cause for each equipment, but it's not grouping up the equipment up together. So, conveyor line with conveyor broken cause is here, there's motor with replace motor, and then conveyor line with backup. I'd like all my conveyor lines to be grouped up together. So, if we go back to the design tab, and we click on our table, and come down to the property inspector one more time, you'll see there are these little up and down arrows to the right hand side of the grouping table. We'll go ahead and change the order of our grouping. So, with cause selected, we'll click down. You'll see equipment and cause change spots. And we take a look in preview. You'll see now it's doing what I'd like it to do. Each piece of equipment has it's own section on the report, and with each of it's causes grouped up within that same piece of equipment.

You are editing this transcript.

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