[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
 [Expand]Product Information
 [Expand]Get Started with DevExpress Reporting
 [Expand]Create Popular Reports
 [Collapse]Detailed Guide to DevExpress Reporting
   Introduction to Banded Reports
  [Expand]Provide Data to Reports
  [Expand]Use Report Controls
  [Expand]Shape Report Data
   Arrange Dynamic Report Contents
  [Expand]Customize Appearance
  [Expand]Add Navigation
  [Expand]Provide Interactivity
  [Expand]Add Extra Information
  [Expand]Merge Reports
  [Collapse]Use Expressions
    Expression Constants, Operators, and Functions
  [Expand]Store and Distribute Reports
  [Expand]Reporting API
 [Expand]Visual Studio Report Designer
 [Expand]Create End-User Reporting Applications
 [Expand]API Reference
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Use Expressions

Expressions are used to specify criteria for retrieving and formatting data, creating calculated fields and calculating summaries, conditionally shaping data and changing a report control's appearance.

Expanded Expression Syntax

An expression is a string that, when parsed and processed, evaluates a value. Expressions consist of field names, constants, operators, and functions. Field names must be wrapped in square brackets. Here are examples of expressions:

"[Quantity] * [UnitPrice] * (1 - [BonusAmount])"

"[FirstName] + ' ' + [LastName]"

"[Country] == 'USA'"

"[OrderDate] > #8/16/1994# AND [Quantity] > 20"

There is a list of operators, constants and functions that you can use in expressions. Refer to the Expression Operators, Functions, and Constants topic for details on their usage.

You can implement custom expression functions for your reporting applications. Refer to the CustomFunctions class description to learn how to do it.

Expanded Expression Editor

The Report Designer allows you to use the Expression Editor that provides functions, operators, data source fields, report elements, constants and variables to construct expressions.

The Expression Editor supports syntax highlighting and intelligent code completion (suggesting functions and available data elements as you type).

The Expression Editor displays all the errors it finds in the specified expression.

Expanded Filter Editor

The Report Designer allows you to use the Filter Editor to specify filter criteria. The Filter Editor provides a visual interface for constructing filter criteria with an unlimited number of filter conditions combined by logical operators. You can also switch to the Text mode to type a filter string manually.

The Filter Editor supports intelligent code completion (suggesting functions and available data elements as you type) and error validation features.

Is this topic helpful?​​​​​​​