Skip to main content
A newer version of this page is available. .

CrossTabGroupFieldBase.GroupInterval Property

Specifies how field values are combined into groups.

Namespace: DevExpress.XtraReports.UI.CrossTab

Assembly: DevExpress.XtraReports.v20.2.dll

NuGet Packages: DevExpress.Reporting.Core, DevExpress.WindowsDesktop.Reporting.Core

Declaration

[DefaultValue(GroupInterval.Default)]
[SRCategory(ReportStringId.CatData)]
public GroupInterval GroupInterval { get; set; }

Property Value

Type Default Description
GroupInterval Default

Specifies how values are combined into groups.

Remarks

The Cross Tab does not group values of column and row fields and displays all their unique values.

The GroupInterval property allows you to combine original field values into bigger categories (groups). To access this property at design time, select a cell bound to the corresponding data field and click its smart tag. Alternatively, you can set this property in the Properties window.

Group Date-Time Values

The following image shows the Cross Tab that displays unique date-time values.

You can group date-time values by years, months, quarters, days, hours, etc. Refer to the GroupInterval enumeration’s description for the complete list of available intervals.

Group String Values

The following image illustrates the Cross Tab that displays unique string values (product names).

Set the GroupInterval property to Alphabetical to combine values by the first character.

Group Numeric Values

The Cross Tab on the following image displays unique numeric values (order IDs).

Set the GroupInterval property to Numeric and use the GroupIntervalNumericRange property to specify the interval length. For instance, set the range to 100 to combine records into groups of 100 orders.

Group Data in a Custom Way

If the standard group intervals do not suit your requirements, you can implement custom group logic. Create a calculated field and specify its Expression property. For instance, use the following expression to combine field values by the start characters into three large ranges: A-E, F-S, and T-Z.

Iif(Substring([ProductName], 0, 1) < ‘F’, ‘A-E’, Iif(Substring([ProductName], 0, 1) < ‘T’, ‘F-S’, ‘N-Z’))

Add this calculated field to the Cross Tab’s RowFields or ColumnFields collection.

See Also