Pro SQL Server 2012 Reporting Services

(sharon) #1

CHAPTER 4  LAYING OUT A REPORT


Now add the Sum function to the Visit_Count and Estimate_Cost fields so that each field will be of
the syntax =Sum(Fields!fieldname.Value). If you had added a grouping level to the list (you will do that
shortly), the Sum function would have been automatically added to these fields.
Next, size the fields so that when you’re finished, the report looks like Figure 4-2. In Visual Studio
2010 and BIDS, as you work with the layout of report objects, the design environment has been
enhanced to control automatic alignment as you drag and drop objects, so it is far easier to design
professional-looking reports. At this point, however, you aren’t concerned with beauty, but with
functionality.

Figure 4-2. List data region with ungrouped fields

When you click the preview button, the report will generate and display visit information for each
patient and employee (see Figure 4-3). Notice that the sum of the fields Visit_Count and Estimated_Cost
is the same for each record. Each sum amount is the same for all patients and employees because you
have not yet defined any grouping for the List itself. You will do that next.
Free download pdf