[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
[Collapse]Reporting
 [Expand]Product Information
 [Expand]Get Started with DevExpress Reporting
 [Expand]Create Popular Reports
 [Collapse]Detailed Guide to DevExpress Reporting
   Introduction to Banded Reports
  [Collapse]Provide Data to Reports
   [Expand]Bind a Report to a Data Source
   [Collapse]Bind Report Controls to Data
     Data Binding Modes Comparison
     Bind Report Controls to Data (Expression Bindings)
     Bind Report Controls to Data (Legacy Data Bindings)
     Use Embedded Fields (Mail Merge)
     Update Report Data Bindings
  [Expand]Use Report Controls
  [Expand]Shape Report Data
   Lay out Dynamic Report Contents
  [Expand]Customize Appearance
  [Expand]Add Navigation
  [Expand]Provide Interactivity
  [Expand]Add Extra Information
  [Expand]Merge Reports
  [Expand]Use Expressions
  [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]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Data Binding Modes Comparison

The Report Designer can use expression or standard data bindings to provide dynamic content to your reports.

Expanded Expression Bindings

Expression Bindings (the default mode) enables you to specify complex expressions that include two or more data fields and various functions. You can also use expressions to calculate summaries of any complexity without scripts and conditionally shape your data without formatting rules.

Switch the Property Grid to the Expressions tab and invoke the Expression Editor to construct expressions.

The Expression Editor allows you to use a wide range of functions, access report bands and controls, and reference the current data source values.

Note that this approach can slow down complex calculations compared to standard bindings.

Expanded Legacy Data Bindings

Data Bindings is the legacy approach earlier report versions use.

This mode enables you to assign a single data field to a report control's binding properties. To provide custom binding logic, handle report script events, which has security implication.

Expanded Binding Mode Comparison

Bind to a Single Data Field

  • The Field List panel allows you to drop fields onto the design surface or existing report controls. All binding ways are identical in the expression and data binding modes.

  • The control's smart tag enables you to select the target data field in the corresponding drop-down list.

    Expression Bindings

    Data Bindings

  • You can select a report control and bind it to data in the Property Grid.

    Expression Bindings

    Data Bindings

    Switch to the Expressions tab and specify a data field for the Text property.

    Expand the (Data Bindings) category and assign a data field to the Text property.

See the Bind Report Controls to Data topic for more information.

Bind to Multiple Data Fields

Expression Bindings

Data Bindings

Use the mail merge functionality.

Click the Expression property's ellipsis button and specify the expression.

Use the mail merge functionality.

Calculate Summary

Expression Bindings

Data Bindings

Select the summary function in the Expression Editor's Summary section.

All functions has the 'sum' prefix.

See Calculate a Summary for more information.

Select the summary function in the Summary Func drop-down list.

See Calculate a Summary for more information.

Complex Bindings, Custom Summary

Expression Bindings

Data Bindings

Use the Expression Editor to construct an expression of any complexity.

Refer to Calculate an Advanced Summary for an example.

Use report scripts.

Refer to Calculate a Custom Summary for an example.

Conditionally Customize Appearance

Expression Bindings

Data Bindings

Use the Expression Editor to construct expressions for a control's appearance and style properties.

Refer to Conditionally Change a Control's Appearance for an example.

Create formatting rules and assign them to report controls.

Refer to Conditionally Change a Control's Appearance for an example.

Expanded Set Binding Mode

Specify the static UserDesignerOptions.DataBindingMode property to select which binding mode your reports use. You can set this property to the following DataBindingMode enumeration values:

Use the Report Designer Options dialog to set the DataBindingMode property in Visual Studio at design time.

Note

Reload the Report Designer after changing the binding mode.

Use the following code to specify the End-User Report Designer's DataBindingMode property:

Expanded Convert Bindings to Expressions

The built-in automatic report conversion tool helps you convert your existing reports to use the new binding mechanism. This tool runs in the following scenarios:

Use the Report Designer Options dialog to set the UserDesignerOptions.ConvertBindingsToExpressions property in Visual Studio at design time.

Use the following code to specify the End-User Report Designer's UserDesignerOptions.ConvertBindingsToExpressions property:

You cannot convert a report in the following cases:

  • A report contains one or more controls bound to a data source that is not assigned as the report's data source.
  • A report contains a formatting rule whose data source differs from the report's data source.
Note

It is not possible to convert reports from expressions back to legacy bindings.

Expanded See Also

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