Understanding Expression References (Report Builder 2.0)
When you write an expression in Reporting Services, you have access to many built-in fields, built-in collections, and functions that you can use alone or combine with other terms. When you create an expression interactively in the Expression dialog box, you can explore the categories of references that you can include, and see context-sensitive examples of constants, built-in collections, and functions available for including in your expressions. For examples of where you can use expressions, see Using Expressions (Report Builder 2.0) and Expression Examples (Report Builder 2.0).
You can add function calls, operators, constants, fields, parameters, items from the built-in collections, and references to embedded custom code or custom assemblies. Built-in function calls include aggregation and report calculations, the Visual Basic run-time library, and .NET Framework common language runtime (CLR) classes for Math and Convert. You can also include references to other .NET Framework classes and external assemblies.
When you create an expression for a specific report item property, the types of references you can include depend on the values that the property can accept. For example, if you create an expression for the value for a Font property, the value must evaluate to the name of a font.
The following table shows the kinds of references you can include in an expression.
Describes the constants you can access interactively for properties that require constant values, for example, font colors.
Describes the operators you can use to combine references in an expression, for example, the & operator is used for concatenating strings.
="The report ran at: " & Globals!ExecutionTime & "."
Describes the built-in collections that you can include in an expression, for example, Fields, Parameters, and Variables.
Describes the built-in functions such as Sum or Previous that you can access from an expression.
Describes how you can access custom code that is embedded in your report or that you compile and install as a custom assembly on both the report client and the report server.
For more examples, see Expression Examples (Report Builder 2.0).