The requested page is not available for the requested platform. You are viewing the content for Default platform.

Use Expressions

  • 2 min to read

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.

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.

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.

Expressions_ExpressionEditor

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

Expressions_ExpressionEditor_Intellisense

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

Expressions_ExpressionEditor_ErrorValidation

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.

Expressions_FilterEditor

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

FilterEditor_New_Features