Export (0) Print
Expand All

RunningValue Function (Reporting Services)

Updated: 15 September 2007

Returns a running aggregate of the specified expression.


RunningValue(Expression, Function, Scope)

Expression

(Data type is determined by the aggregate function specified in Function.) An expression that evaluates to numeric data on which to perform the aggregation. The expression cannot contain aggregate functions.

Function

(Enum) The name of the aggregate function to apply to the expression. This function cannot be RunningValue, RowNumber, or Aggregate.

Scope

(String) The name of a dataset, grouping, or data region that contains the report items to which to apply the aggregate function. If a dataset is specified, the running value is not reset throughout the entire dataset. If a grouping is specified, the running value is reset when the group expression changes. If a data region is specified, the running value is reset for each new instance of the data region. For more information about the Scope parameter, see Using Report Functions in Expressions (Reporting Services).

Determined by the aggregate function that is specified in the Function parameter.

Restrictions for RunningValue are also determined by the aggregate function specified in the Function parameter. For more information, see the topic for the aggregate function that you are interested in using.

The set of data specified in the expression must have the same data type. To convert data that has multiple numeric data types to the same data type, use conversion functions like CInt, CDbl or CDec. For more information, see Type Conversion Functions.

Scope cannot be an expression.

The following code example provides a running sum of the cost field in the outermost data region.

RunningValue(Fields!Cost.Value, Sum, Nothing)

Community Additions

ADD
Show:
© 2014 Microsoft