Using Expressions in Reporting Services
Expressions are widely used throughout a report definition to retrieve, calculate, display, group, sort, filter, parameterize, and format the contents of a report. Some expressions are created for you automatically (for example, when you drag a field from the dataset window onto a table cell, an expression that retrieves the value of that field is displayed in the text box). However, in most cases, you create your own expressions to get the following kinds of functionality in your report:
- Aggregations on data to show the sum, average, percentage, or product of a particular row set.
- Conditional formatting, where text or background formatting changes based on logic you define.
- Conditional text, where a report title varies depending on who is running the report.
- Concatenated text from multiple dataset fields and constants.
- Filtered report data after it has been retrieved from the data source.
- Parameterized drillthrough reports.
- Data grouping and sorting.
- Dynamic page header and page footer content.
In Reporting Services, knowing how to create and use expressions is a fundamental skill that will enable you to create rich full-featured reports. Expressions are written in the Microsoft Visual Basic language. For a list of many expression examples, see Working with Expressions in Reporting Services.
In This Section
- Working with Expressions in Reporting Services
Introduces expressions and discusses where they are used and applied in reports.
- Creating Expressions in Reporting Services
Describes how to create expressions.
- Using Global Collections in Expressions (Reporting Services)
Discusses referencing global collections in expressions.
- Using Report Functions in Expressions (Reporting Services)
Discusses referencing built-in report functions in expressions.
- Using Custom Code References in Expressions (Reporting Services)
Discusses referencing custom code, custom report items, and custom assemblies in expressions.
- Using Extended Field Properties for an Analysis Services Database
Discusses the custom field properties provided by the Analysis Services data extension.
- Expression Examples in Reporting Services
Presents examples of commonly used expressions.
See Also
Concepts
Other Resources
Edit Expression (Report Designer)
Reporting Services Programming