Pro SQL Server 2012 Reporting Services

(sharon) #1
CHAPTER 6  BUILDING REPORTS

Adding the Gauge Control

Gauge controls are one of the most aesthetically appealing types and are useful for reports that focus on
Key Performance Indicators (KPIs). Such reports are designed to be viewed in dashboard format for at-a-
glance views of data, as you saw in Chapter5. In this section, we will combine the report variable we
created in the previous section with one of these new controls to create a visual cue within the Employee
Service Cost report. This report will show us how many visits have been made per day for the time period
we are analyzing.
You can determine the average number of visits by a very simple calculation dividing the sum of the
visit counts by a distinct count of the ChargeServiceStartDate field. You can perform that computation
using the Emp_Svc_Cost_MVP stored procedure. This average number of visits value will become one of
the two pointers in the gauge control, which will be the multiple bar gauge. The other pointer in the
control will hold the threshold value of 44.
To begin, drag a Gauge control from the Toolbox onto the report to the right of the chart. Just make
sure it is inside the Rectangle. Select the Multiple Bar Pointers gauge. There will be three bars by default.
You will only use two of the bars for this report, LinearPointer1 and LinearPointer2. Go ahead and delete
the small one (LinearPointer3) by right-clicking it and choosing to Delete Pointer. Assign the expression
=Variables!Threshold.Value to LinearPointer1 by right-clicking the pointer and selecting Pointer
Properties. In the Properties window, assign the variable expression value as shown in Figure 6-40.

Free download pdf