Pro SQL Server 2012 Reporting Services

(sharon) #1

CHAPTER 6  BUILDING REPORTS


Figure 6-40. Assigning a report variable value to the gauge pointer

Next, assign the expression to determine the average number of visits for the time frame selected
from the parameters to LinearPointer2. Because the multivalued parameters are query parameters, you
know that the data in the report will be limited to the values selected from the Month and Year
parameters. This would not be the case if you were using report parameters and subsequently filtering
the data within the report. Knowing, for example, that the number of days over which to calculate the
average will change based on the Month and Year parameter values selected makes it easy to do the
calculation for LinearPointer2. You can write that calculation as

=SUM(Fields!Visit_Count.Value) / CountDistinct(Fields!ChargeServiceStartDate.Value)

Your final step is to set the color coding for the pointer such that the pointer will show red for 44 and
under, and green for over 44. Right-click on LinearPointer2 and select the Pointer Properties option.
Free download pdf