Working with Report Expressions (Report Builder 2.0)
Expressions are widely used throughout a report definition to retrieve, calculate, display, group, sort, filter, parameterize, and format the data in a report. Because many report item properties can be set to an expression, you have great flexibility to control the content, design, and interactive nature of your report by using expressions. Expressions are written in Visual Basic, saved in the report definition, and evaluated by the report processor when you run the report.
On the report design surface, expressions appear as simple or complex expressions. Simple expressions contain a reference to a single dataset field, parameter, or built-in field. Simple expressions appear on the design surface and in dialog boxes in brackets; for example, a dataset field appears as [ProductID]. Simple expressions are created for you automatically (for example, when you drag a field from a dataset onto a text box), or you can type them directly into a data region cell, or text box on the design surface or in a dialog box. Complex expressions can contain multiple built-in references, operators, and function calls, and appear on the design surface as <<Expr>>. To see or change the expression text, you must open the Expression dialog box.
To see evaluated expression values in a report, preview the report. When the report runs, the report processor evaluates the expressions and substitutes the expression results for the property values.
Parameters can be used with expressions to provide additional flexibility for changing the content and appearance of a report. For more information, see Adding Parameters to Your Report (Report Builder 2.0).
In This Section
Understanding Simple and Complex Expressions (Report Builder 2.0)
Introduces expressions and discusses how a single item reference differs from other expressions.
Using Expressions (Report Builder 2.0)
Provides an overview of the different ways expressions can be used to vary report content and appearance, including examples.
Understanding Expression References (Report Builder 2.0)
Discusses what you can include in an expression.
Working with Data Types in Expressions (Report Builder 2.0)
Discusses what you need to know about data types for expressions and expression references.
Expression Examples (Report Builder 2.0)
Presents more examples of expressions for common tasks.