Creating reports with multiple tables in Clear Impact Scorecard
Lesson 5-1 Creating a Report from multiple Tables
Goal - The goal of this lesson is to create a report that has calculated fields from multiple tables to display the number of scorecard objects by Scorecard name.
- Click Reports on the main menu
- Click on the New Report menu item
- On the "Data Sources" tab. Select the table checkboxs in the following order Scorecards, Scorecard_Programs, Scorecard_Results, Results, Result_Indicators, Programs, Programs_PerfMeasures, Indicators, PerfMeasures.
- The tables with an underscore and two object names like "Result_Indicators" are called "Junction Tables" and define how you connect one object to another. To learn more about Junction Tables check out this article.
- Click on the "Fields" tab.
- For the first field select the "Title" field from the Scorecards table
- Next select the ID field from the Results Table.
- Rename the description for the Result ID to be "Results"
- From the function dropdown for the Result field select "Count Distinct"
- Repeat steps 6-8 for Indicators, Programs, and Performance Measures, remembering to select the ID from the respective table and rename the description accordingly.
- Click on the "Preview" tab so you can view the report.
- You may notice a blank row without a scorecard title, these are objects that are not linked to a scorecard. To filter this row out select the Filters tab.
- This blank row only displays if you have "Allow Nulls" checked on the data sources tab. This will do an outer join which will make sure all items are displayed regardless of their relationships.
- For the filter field select "Title" from the scorecards table and set the operator to "Isn't Blank"
- Now let's add a title- click on the "Misc" tab.
- In the "Title" text box enter "Number of Objects by Scorecard"
- Click the "Preview" tab. Now the report is titled. Let's Save it.
- Click on the "Save as" tool bar button, name your report, for example "Lesson 5-1", and enter the category you want the report to be shown under, for example "Training", click ok. The custom report is saved.
Figure 11. Screen shot from report made in Lesson 5-1
Lesson 5-2 Adding Some Statistics to the Report
Goal - The goal of this lesson is to modify the report created in Lesson 5-1 by adding a subtotal and showing the percentage of the group.
- If you saved the report from the previous lesson you will need to re-open it in the designer by clicking on the pencil icon on the report in the list.
- Let's add a field that shows the percentage of Results that are on each Scorecard. Click on the "Fields" tab.
- In the bottom most row under the "Field" label, select "ID" from the Results table. After selecting the field we need to count the number of products in each category and show them as a percentage.
- Select the "Count Distinct" function for the "Function" in the field we just added. Also select the "% of Group (with rounding)" from the Format field. Now let's put a new description for this field.
- In the description field "% Results". Now let's sum up the columns.
- Add a subtotal by selecting "Add Subtotals" checkbox at the bottom of the Fields tab.
- Click the "Preview" tab. The percentage of group statistics and subtotals has been added to the report. Let's Save it.
- Click on the "Save as" tool bar button, name your report, for example "Lesson 5-2", and enter the category you want the report to be shown under, for example "Training", click ok. The custom report is saved.
Figure 12. Screen shot from report made in Lesson 5-2