Learn how to make properties on report components dynamic by binding Data Keys.

Video recorded using: Ignition 7.9


(open in window)

[00:00] So far we've been using some fairly static values, but let's take a look at using a dynamic data key to make changes to how a report looks. What I'd like to do is I have this quantity column here. And I went ahead and I changed the fill color just so you can see that the row's there and the actual width of it. What I'd like to do is have this slider determine the width of the column. And then I want to be able to check or uncheck this check box here to either hide or show the column. And the way we're going to do this is we're going to create some parameters. And the reason we're doing that is I select this report here and I scroll down here. You can see that any parameters we create on the report are exposed to the client. So that means we can go ahead and from the runtime make changes to our report. Let's get started. We'll come up to the Project Browser. And we'll click on Price Report. And let's create a couple parameters. So first we'll do IsVisible. And we'll change this to a Boolean. And we'll have a default value of true. Next let's go ahead and create one more actually. We'll create Width. And we can do a value of, let's just do a Long, I suppose. And we'll set the value to 100. So we have our two parameters. We'll come to the Design panel here. And let's select our cell, our Order Quantity cell, our second column over. We'll come to the Property Inspector. Click on the Properties tab, and we'll scroll all the way down to the bottom here. And we got our Width and our Visible, so let's go ahead and drag Width, our Width key, our parameter. And we'll drop it just on top of the Width property here. And you can see the binding has been set. And let's go ahead and take IsVisible and do the same on the Visible property. So it really won't show, or it really won't be too interesting in the Preview panel here, but let's go take a look at it in the window. If we come back over here and we need to set these first. It's currently set to true, but we can overwrite that hide it, seeing how it's working already. But let's go ahead and just bind this to our check box. So we'll go to the Property Binding, find our check box. Got the Selected property, click OK. And let's set our width as well. So we'll go ahead and bind, do another property binding here. Find the slider and we'll set the value, click OK. Perfect, so you can see it's already taken effect here. So if we come to the Preview Mode, we can go ahead and just adjust the slider. And we can choose to hide or show the column. So you see that when we run the report or when we just expose the report to the client, we can go ahead and make a lot of changes to it that will tailor the report to the specific need at that time.

You are editing this transcript.

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