Udostępnij za pośrednictwem


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

See Also

Concepts

Working with Report Designer

Other Resources

Edit Expression (Report Designer)
Reporting Services Programming

Help and Information

Getting SQL Server 2005 Assistance