[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]Getting Started with DevExpress Reporting
 [Expand]Creating Popular Reports
 [Collapse]Detailed Guide to DevExpress Reporting
   Introduction to Banded Reports
  [Expand]Providing Data to Reports
  [Expand]Using Report Controls
  [Expand]Shaping Report Data
   Laying out Dynamic Report Contents
  [Expand]Customizing Appearance
  [Expand]Adding Navigation
  [Expand]Providing Interactivity
  [Expand]Adding Customary Information
  [Expand]Merging Reports
  [Collapse]Using Expressions
    Reporting Specifics in Expressions
  [Expand]Storing and Distributing Reports
  [Expand]Reporting API
 [Expand]Visual Studio Report Designer
 [Expand]Creating End-User Reporting Applications
 [Expand]API Reference
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
This documentation page describes implementations made in our v17.2 release cycle. To learn about functionality shipping with v18.1, navigate to our updated help file experience at docs.devexpress.com. Learn More

Using 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 brackets. Here are examples of expressions:

"[Quantity] * [UnitPrice] * (1 - [BonusAmount])"
"[FirstName] + ' ' + [LastName]"
"[Country] == 'USA'"
"[OrderDate] > #8/16/1994# AND [Quantity] > 20"

See the following topics to learn how to write expressions:

  • There is a list of basic operators and functions that you can use in expressions. Refer to the Criteria Language Syntax topic in the Cross-Platform Core Libraries Documentation for details on their usage.

  • There are reporting-specific expression functions that you can use within reporting applications. Refer to the Reporting Specifics in Expressions topic for details.

  • 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?​​​​​​​