Using Aggregate Functions

You use aggregate functions primarily to summarize many records of numerical data, such as giving a total or average value. You can also use aggregate functions to get the first or last string value in a group of records.

To work successfully with aggregate functions, you must first understand how the location of an expression in the report affects when it is evaluated. An expression in the report body has access to the dataset and therefore can reference an object directly in the Fields collection. However, an expression in the page header or page footer is evaluated after the report body is processed when the dataset is no longer available. Although you can no longer use the Fields collection, you can access the results ...

Get Microsoft® SQL Server® 2008 Reporting Services Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.