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 training@inductiveautomation.com.
Version:
LESSON LIST
-
5:29Reporting Interface
-
4:00Report Data Tab
-
4:38Report Design Tab
-
5:04Report Schedule Tab
Take Topic Challenge
Supplemental Videos
-
4:34Simple Report
LESSON
Simple Report
Description
Learn how to create a simple report with a header, table, and pie chart
Video recorded using: Ignition 8.1
Transcript
(open in window)[00:00] Now that we have a solid foundation of the report designer interface, let's take what we have learned and create a simple report. The objective is to create a daily inventory report outlining the quantity of fruit available at a mock facility doing frozen smoothly production. To start, I already have this report created named fruit inventory. Let's click on the data tab so we can review the data sources we'll incorporate into the report. Under my parameters, I have this date time parameter using an expression function, which provides the current date and time. I also have the default parameters for start and end date. Below these in my data sources, I have an SQL query that selects everything from the fruit inventory table. Let's start by designing our report by going to the design tab. The first thing we typically need when designing reports is adding a title, so I'll create one by first clicking on the text component under shapes, and then clicking towards the top of my report to add that in. I'll type in the text box Daily fruit inventory.
[01:03] The text here is a bit too small to read, so we can adjust the font by going to the properties tab of the property inspector with the components selected. Next, we'll click on the font property and click this dropdown to access our font options. I'll leave the font the same and I'll adjust the size to 40. Then I'll enable the bold property to true, just so it stands out a little bit more. Finally, I'll click okay to apply the changes. With these changes, we'll need to resize and position our title so we can first select the report by clicking in any empty space and clicking on our text box again lets us resize it with the arrow handles. Let's drag it towards the center of the report as well. Since we have a title in place, let's start adding in our data. I think a table component will be good here, so I'll drag one in from under the components section. We don't need all of these columns here in our details, so we can adjust this by clicking where we see object details. Next, we'll adjust the column count property by setting it to two. To drive the table's data, we'll need the table's data key, so let's select our table, and then we'll expand the data sources folder and our query.
[02:07] We'll drag our query down into the data key. In the first column, we'll drag in our fruit key, and in the second column our quantity key. I'd like to adjust the font on these columns as well. So we'll start by selecting our fruit cell. Let's give it a size of 20 and set it to bold. And then for quantity, let's give it a size of 20 as well. Next, let's go ahead and resize this whole table and center it below our title. We'll go to the preview tab to see how that looks. We can see it's looking pretty good. Now as you're designing reports, you'll want to make use of this preview tab during the process so you can get an idea of how everything is coming together. Now, I'd like to represent the percentage of each category of fruit out of our total amount of fruit. Let's go back to the design tab. To accomplish this, let's drag in a pie chart from the graphs and charts section, and we'll drop it below our table.
[03:02] Again, we'll drag our query to the data key. For the label key will drag in fruit and we'll drag quantity into the value key. Let's change our segment colors as well since the default pie segment colors are a bit ambiguous. We'll move over to the properties tab. Let's set our label style to outset to represent our percentage. Next, I'll adjust this labels format just to give us the fruit and the percentage. If you're curious about how some of these components and their properties work, then I'd recommend watching the specific component videos throughout this course. Finally, let's add the current date time to this report. We can make use of the text box again, and let's s place that in the bottom right corner. Then we can expand our parameters folder. Let's drag in current date time to this text box, and then let's resize this text box a bit. Let's go to the preview tab to see how everything is looking. We can see the report is looking good, and we have a simple representation of our inventory. Now this report is supposed to run daily, so let's go ahead and configure its schedule.
[04:04] We'll click on the schedule tab to add the schedule. We'll click on the add new schedule icon. We'll leave the schedule frequency at this once per day common setting. Finally, let's go to the actions tab and I'll create a new save file action. At this point, you would just paste the path to the folder you'd like to save this report in. You can see that once we had our data sources ready, it was very easy to create a simple report within the report designer interface.