UserDesignerOptions.ShowFieldListDateTimeComponents Property
Specifies whether to expand date-time fields in the Field List panel to reveal their components so you can directly bind them to report controls.
Namespace: DevExpress.XtraReports.Configuration
Assembly: DevExpress.XtraReports.v25.1.dll
NuGet Package: DevExpress.Reporting.Core
Declaration
Property Value
Type | Description |
---|---|
Boolean |
|
Property Paths
You can access this nested property as listed below:
Object Type | Path to ShowFieldListDateTimeComponents |
---|---|
ReportingSettings |
|
Settings |
|
Remarks
If you need to display a date-time value component, you no longer need to specify a format string or use expression functions. The Field List window now allows you to expand date-time fields and see available components. You can drag and drop these components onto existing controls to establish new data bindings or place them on the report surface to create new data-bound controls.
You can set the ShowFieldListDateTimeComponents
property to true
at application startup or in the Visual Studio Report Designer settings window. When this property is enabled, the Field List displays date-time components for DateTime, DateOnly, and TimeOnly fields:
- DateOnly
- Day, Month, Year
- DateTime
- Day, Month, Year, Hour, Minute, Second
- TimeOnly
- Hour, Minute, Second
This functionality supports two modes. When a field is dropped from the Field List, the Report Designer automatically creates an expression binding and does one of the following:
- Format String
Example:
{0:%d}
,{0:%M}
Applies a format string to field values according to the selected date-time component. This mode is useful for displaying formatted date or time values in a report.
- Expression
Example:
GetDay
,GetMonth
Assigns an expression function when you add a field component from the Field List or use a field component in the Expression Editor. You can further refine expressions in the Expression Editor. This mode is most useful when you need to combine data from multiple data source fields.
Use the DateTimeComponentBindingMode to switch between modes.
See the class description for information on how to set designer options in code: UserDesignerOptions.