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 firstname.lastname@example.org.
We are experiencing playback issues from our video hosting provider. Please check back shortly.
2:03Reporting Component Properties
3:17Use Dynamic Data Key
Take topic challenge
Learn how to run math calculations on data keys in the Design Panel. Explore using them in a table.
Video recorded using: Ignition 7.9
Transcript(open in window)
[00:00] Let's take a look at some simple key calculations. So, I'm in the Design panel. I have a Table set up. Just using my Fruit With Price data source. There are three columns there, Fruit, Order quantity, and Price per piece. Now, I'll begin with a very simple calculation. We'll take our Order quantity key and we'll drag and drop it to this third column on our table. We'll click on the cell that we just dropped the Order quantity key to, and I'll head down to the Property Inspector. In the Edit Text tab, there's this text field. And, in between the last at symbol and our key, place an asterisk and a 10. So now, the value of this column on our table will be whatever Order quantity's value is, times 10, for each row. We head to the Preview panel. We can see it's working. I'm going to compare it to the second column. That's just a little more complicated. We'll head back to the Design panel. We'll clear out this third cell on our table, and we'll place Price per piece here instead. We'll then click on our fourth column. We'll head over to Key Browser. We'll drag Order quantity down to the Edit Text field in the Property Inspector. And we'll do the same with Price per piece. Now, I'd like to multiply both of these values together, to see what the grand total was. And the way we'll do that is by removing these two at symbols here in the middle, and replacing them with an asterisk. So now we're multiplying both keys together. If we head over to the Preview panel, you can see that it's working. However, there's two problems. One, I'd like to add a dollar sign, and, two, I would like to make sure we're always showing two decimal places on our total. But we can change that very easily. We'll head back to the Design panel. We'll select the column. We'll come down to the Property Inspector. And first, right before that first at symbol, we'll put a dollar sign. Then we'll head over to the Property tab and we'll scroll down until we find Number Format. We'll click on this percent symbol, and we'll select this format string, to make sure that we're always showing at least two decimal places. We'll click Okay. Take a look at the Preview panel, and there we are. Now, it's important to note that you can perform key calculations anywhere within your report, it doesn't have to be in a table.