[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
  [Expand]Provide Data to Reports
  [Expand]Use Report Controls
  [Collapse]Shape Report Data
   [Expand]Filter Data
   [Expand]Group and Sort
   [Collapse]Shape Data (Expression Bindings)
     Format Data
     Conditionally Change a Control's Appearance
     Conditionally Change a Label's Text
     Conditionally Filter Report Data
     Conditionally Suppress Controls
     Limit the Number of Records per Page
     Conditionally Change a Band's Visibility
     Calculate a Summary
     Calculate an Advanced Summary
     Display Row Numbers in a Report, Group or Page
     Count the Number of Records in a Report or Group
     Count the Number of Groups in a Report
   [Expand]Shaping Data (Legacy Data Bindings)
   [Expand]Use Calculated Fields
   [Expand]Use Report Parameters
   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]eXpress Persistent Objects
[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)

Format Data

This document describes how to apply standard .NET formats to data values in a report.

Note

You can use this approach to formatting data when the UserDesignerOptions.DataBindingMode is set to DataBindingMode.Expressions or DataBindingMode.ExpressionsAdvanced.

See Format Data to learn about the legacy approach.

See Data Binding Modes to learn more about the available binding modes.

After you bound your report to data and specified a bound data field in a report control's Expression property, you can format data values in a report.

  • Invoke the control's smart tag and click the Format String property's ellipsis button:

  • This invokes the Format String Editor where you can specify the required format:

Alternatively, you can use the FormatString function within the expression you specified for the report control.

When switching to Print Preview, you can view the report control displaying values with the specified format:

Tip

You can use the XRControl.XlsxFormatString property to assign a native Excel format to a control that is used for exporting reports to XLSX.

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