Data Dynamics Reports Online Help
Aggregates and Scope
See Also Support Forum
User Guide > Creating Reports > Report Concepts and Architecture > Aggregates and Scope

Glossary Item Box

Aggregates

You can use aggregate functions within report item value expressions to accrue data. Aggregate functions have a Scope parameter which is optional unless your report contains more than one dataset and the expression is not contained in a data region. Here are the aggregate functions supported by Data Dynamics Reports:

Function Description
Avg Calculates the average of the non-null values returned by the expression.
Count Calculates the number of values returned by the expression.
CountDistinct Calculates the number of distinct values returned by the expression.
CountRows Calculates the number of rows in the scope of the expression.
DistinctSum Calculates the sum of the values returned by an expression using only the rows when the value of another expression is not repeated.
First Shows the first value returned by the expression.
Last Shows the last value returned by the expression.
Max Shows the largest non-null value returned by the expression.
Median Shows the value that is the mid-point of the values returned by the expression. Half of the values returned will be above this value and half will be below it.
Min Shows the smallest non-null value returned by the expression.
Mode Shows the value that appears most frequently in the values returned by the expression.
StDev Calculates the dispersion (standard deviation) of all non-null values returned by the expression.
StDevP Calculates the population dispersion (population standard deviation) of all non-null values returned by the expression.
Sum Calculates the sum of the values returned by the expression.
Var Calculates the variance (standard deviation squared) of all non-null values returned by the expression.
VarP Calculates the population variance (population standard deviation squared) of all non-null values returned by the expression.
RowNumber (Running Aggregate) Shows a running count of all the rows returned by the expression.
RunningValue (Running Aggregate) Uses one of the above functions to show a running aggregate of the values returned by the expression.
Aggregate (Custom Aggregate) Calculates a custom aggregate from the data provider of the values returned by the expression.

Scope

The default scope of an aggregate function in a data region is the innermost grouping to which the report item belongs. You can specify the name of another grouping, dataset, or data region, or you can specify Nothing to choose the outermost grouping to which the report item belongs.

The default scope of an aggregate function outside a data region is the dataset. You must specify the dataset if there is more than one to avoid ambiguity. You cannot specify Nothing for the scope of a report item outside a data region.

Note: You cannot use the scope parameter in page headers or page footers.

See Also

©2010. GrapeCity, inc. All Rights Reserved.