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.v19.2.dll

NuGet Package: DevExpress.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.

Available values:

Show 24 items
Name Description
Default

Groups combine unique field values.

Date

This option is in effect for fields that store date-time values.

Field values are grouped by the date part, the time part is ignored.

DateDay

This option is in effect for fields that store date-time values.

Field values are grouped by the day part. The following groups are supported: 1, 2, 3, … , 31.

DateDayOfWeek

This option is in effect for fields that store date-time values.

Field values are grouped by the days of the week. The actual names depend on the current culture. For instance: Sunday, Monday, Tuesday.

DateDayOfYear

This option is in effect for fields that store date-time values.

Field values are grouped by the number of the day in which they occur in a year. The following groups are supported:: 1, 2, 3,…,365 (366 in a leap year).

DateWeekOfMonth

This option is in effect for fields that store date-time values.

Field values are grouped by the number of the week in a month in which they occur. The following groups are supported: 1, 2, 3, 4, 5 and 6.

DateWeekOfYear

This option is in effect for fields that store date-time values.

Field values are grouped by the number of the week in a year in which they occur. The following groups are supported: 1, 2,…,52, 53.

DateMonth

This option is in effect for fields that store date-time values.

Field values are grouped by the month part. The following groups are supported: January, February, …, December. The actual month names depend on the current culture.

DateQuarter

This option is in effect for fields that store date-time values.

Field values are grouped by the quarterly intervals of the year. The following groups are supported: 1, 2, 3 and 4. Each quarter includes three months.

DateYear

This option is in effect for fields that store date-time values.

Field values are grouped by the year part. For instance: 2017, 2018, 2019.

YearAge

This option is in effect for fields that store date-time values.

Field values are grouped by the number of full years that have elapsed until the current date. The GroupIntervalNumericRange property defines the length of groups.

MonthAge

This option is in effect for fields that store date-time values.

Field values are grouped by the number of full months that have elapsed until the current date. The GroupIntervalNumericRange property defines the length of groups.

WeekAge

This option is in effect for fields that store date-time values.

Field values are grouped by the number of full weeks that have elapsed until the current date. The GroupIntervalNumericRange property defines the length of groups.

DayAge

This option is in effect for fields that store date-time values.

Field values are grouped by the number of full days that have elapsed until the current date. The GroupIntervalNumericRange property defines the length of groups.

Alphabetical

Field values are grouped by the first character of these values.

Numeric

This option is in effect for fields that store numeric values.

Field values are grouped into intervals defined by the GroupIntervalNumericRange property.

Hour

This option is in effect for fields that store date-time values.

Field values are grouped by the hour part regardless of the date to which the current value belongs.

Minute

This option is in effect for fields that store date-time values.

Field values are grouped by the minute part regardless of the date to which the current value belongs.

Second

This option is in effect for fields that store date-time values.

Field values are grouped by the second part regardless of the date to which the current value belongs.

DateMonthYear

This option is in effect for fields that store date-time values.

Field values are grouped by months and years. For instance: January 2018, September 2018, January 2019.

DateQuarterYear

This option is in effect for fields that store date-time values.

Field values are grouped by the year and quarter. For instance: Q3 2018, Q4 2018, Q1 2019.

DateHour

This option is in effect for fields that store date-time values.

Field values are grouped by the date part with the hour value. For instance: 3/4/2018 0:00, 3/4/2018 1:00, 3/4/2018 2:00.

DateHourMinute

This option is in effect for fields that store date-time values.

Field values are grouped by the date part with the hour and minute values. For instance: 3/4/2018 0:00, 3/4/2018 0:01, 3/4/2018 0:02.

DateHourMinuteSecond

This option is in effect for fields that store date-time values.

Field values are grouped by the date part with the hour, minute and second values. For instance: 3/4/2018 0:00:00, 3/4/2018 0:00:01, 3/4/2018 0:00:02.

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