Pro SQL Server 2012 Reporting Services

(sharon) #1
CHAPTER 6  BUILDING REPORTS

In preparation for adding interactivity to the report, you will sum the Estimated_Cost and
Visit_Count fields at all grouping levels by copying the Employee Cost and Visit Count textboxes at the
Employee Name group level and pasting them into the cells in each group heading row—in this case, for
Diagnosis, Service Type, and Patient Name. Alternatively, you could choose to enter the Sum value
expression or to select Sum under the Summarize By submenu, as mentioned previously. If you choose
one of these methods rather than copying and pasting, you will need to apply the currency formatting
(C0) as you did previously. You will also make the topmost grouping (the Diagnosis field) bold by
holding the Control key and clicking to highlight each of the Estimated Cost and Visit Count values in the
Diagnosis group and then clicking the Bold button on the toolbar. With the bold formatting applied, the
summed values at the group level will be easy to distinguish from the detail row values. The design of the
report should look like Figure 6-8.


Figure 6-8. Report design with grouping level subtotals


The output of the report, which you can see by selecting the Preview tab, has much more valuable
information now for each grouping. For Abnormality of Gait’s disease, for example, you can now see that
there were 194 services for a total estimated cost of $9,700, and the bold formatting helps visually
separate the values. The patient Russel Hansen (whose name is indented because of the padding you
applied to the Patient group) is an Abnormality of Gait patient and has had 16 of the 68 home health aide
visits. You can further see each employee’s visit count and the cost for this patient in the rows containing
the Employee_Name grouping (see Figure 6-9).

Free download pdf