Pro SQL Server 2012 Reporting Services

(sharon) #1

CHAPTER 4  LAYING OUT A REPORT


Figure 4-15. Grouping Properties dialog box

To distinguish the patient from the employee, make the Patient_Name cell bold. For clarity, delete
each of the headers that were originally added when you added the detail row fields— click the cells of
the header, and press the Delete key. Next, resize the columns, if required, to expand the Patient Name
and Employee Name columns. You can accomplish this either by dragging the right edge of each column
to the right or by selecting the entire column and entering the desired width in inches in the Properties
window. You can get to the context-sensitive Properties windows by pressing F4.
Finally, you need to set an additional grouping level for the detail row, as you did for the header row
that contains the Patient_Name field. Right-click (Details) in Row Groups and select Group Properties.
Click Add and select the Employee_Name field to be grouped on the details row. You also need to make
sure the Estimated_Cost and Visit_Count fields have the Sum function applied to them—
=Sum(Fields!Estimated_Cost.Value), for example— and then you can preview the report. An easy way to
accomplish this is to highlight the Estimated Cost expression in the Table, right click it and select Sum
under the Summarize By submenu. When the report is rendered, it performs similarly to the List you
created previously, as shown in Figure 4-16.
You can add more grouping levels to the Table at this point if you need to, but for now you’ll learn
how to combine the Table with the free-form Rectangle to show how it’s possible to extend beyond the
structured nature of the Table while maintaining multiple grouping levels.
Free download pdf