Sample Legacy Report Conversion


In this lesson we'll attempt a more complicated conversion, and talk about what to do if there is a problem.

Video recorded using: Ignition 7.9


(open in window)

[00:00] Next let's try to convert a slightly more complicated report. You see I have my Sine Group report here. There are two groups of sine tags I'm looking at. We can show group one or change the selected group property on the report of your component to look at group two instead. There's also a date range component here that allows us to select a different date range. The chart and table inside of the report are both being driven by this data property here, which if you're looking at the binding icon, is just a tag history binding with a little bit of indirection. Let's attempt to convert this report. I'll click OK. We'll right-click on the report of your component and select Convert. Of course, we want to convert this legacy embedded report into a project level report object, so we'll click OK. We'll give this a new name, how about Sine Group. We see a message saying the report converted successfully. Although there appears to be a slight problem. You'll note that the chart's empty. If we poke around a little bit, put the design into preview mode, we can still switch between the groups just fine and it looks like the date range selector's still working. As I mentioned previously, that data property is what was populating the chart as well as the table. The table seems to be working so it might be some sort of problem with the chart. Let's see if we can fix that. We want to start by looking at the report in our report section here so I'll come up to the project browser, we'll expand reports, and we'll open up our sine group report that we just created or converted to. If we take a look at the preview panel, you'll see we're getting a bunch of data collection errors. As mentioned in the converting legacy reports video, parameters are not provided with a default value. It's a good idea to provide default values to our parameters as well as convert our dataset parameters into data sources that the report can use. I'll head over to my data panel and we'll start with the data parameter. We just used the tag history binding on our previous report, so there's no reason we shouldn't do that right now. I'll delete the data parameter and we'll add a new tag historian query. I'll click on the plus icon and we'll select a Tag Historian Query. Just to be consistent, I'll change the data key name to data like we had the parameter not too long ago and let's go ahead and find our historical tags. I know they're in my DB provider up here. We'll you to agent provider in group one and there are my sine tags. I'll just all of my sine tags and drag them over to the selected historical tags table. We need to provide some indirection here. If I expand the tag path here, this group one needs to be able to switch between group one and group two. Previously, that was the job of this selected group parameter. Let's go ahead and do that right now. I'll come over here and we'll modify the tag path. Change from group one to a reference to selected group with curly braces around it and we'll go ahead and just copy what I typed in there including the rest of that or the beginning of the path. We'll apply it to each tag down below and now the tag paths can be based off of that parameter, that selected group. Not quite done with our query here as we should update the start date and end date bindings. We don't have a start date and an end date parameter created but we do have the report end date and report start date. Let's just use those. We'll come to my start date binding, click on the magnifying glass here, and we'll select Report State Date. Click OK and we'll do the same for the end date binding except of course look at the report end date parameter. We don't have to make any other changes to our query here so let's take a look at our parameters next. We'll come up to Selected Group. Let's just make sure that this is always by default looking at group one. Report end date should be easy enough. We can just use the now expression function. Lastly, let's give a value to report start date. Here we can use data arithmetic. We'll use now as the starting value. We'll say how about an hour ago is what this should result to. Let's see this in action. If we head over to the Preview panel again, we see that the data collection warnings are gone. We have our table back. We also have our group and dates listed, though of course the chart's still broken. We haven't really addressed that yet. We'll do that next. We'll head to the Design panel. I'll go ahead and zoom in here just a little bit and let's take a look at the chart. I'll click on my chart and right away once we have the chart selected, we can see what the problem here is. Looks like that's no data key passed into the chart. We can change that. We'll click on the little magnifying glass next to Data Key. Make sure Data is selected, click OK. One other problem I'm seeing is that our pens are labeled Pen one, two, and three when it would nice if were showing Sine zero, Sine one, and Sine two. Let's go ahead and change our pen names, as well. Sine zero. Sine one and there we are. With those changes made, we can go back to the Preview panel. Looks like our chart's working. If we head back to our window, it appears to be working here, as well. To make sure we have our 7-8 reports, Viewer selected, we scroll down. You'll see there's no longer data parameter. Remember that's because we deleted it and we turned it into a data source, but that's intended. You can see after converting a report, sometimes you maybe have to go and take a look at some of the parameters and make sure everything's working correctly. If you have a report that keeps failing to convert, please contact our support department. This way we can make changes and improvements to the conversion process.

You are editing this transcript.

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