Level Function (Reporting Services)
Updated:
15 September 2007
Returns the current level of depth in a recursive hierarchy.
Returns an Integer. If Scope specifies a dataset or data region, or specifies a nonrecursive grouping (that is, a grouping with no Parent element), Level returns 0. If Scope is omitted, it returns the level of the current scope. For more information about the Scope parameter, see Using Report Functions in Expressions (Reporting Services).
The value returned by the Level function is zero based; that is, the first level in a hierarchy is 0.
The Level function can be used to provide indentation in a recursive hierarchy, such as an employee list. For more information about recursive hierarchies, see Grouping Data in a Report.
Scope cannot be an expression.