Skip to main content

RangeParameterEditorOptions Class

A static class that provides access to the list of predefined ranges that are displayed in the date range parameter‘s editor in Print Preview.

Namespace: DevExpress.XtraReports.Parameters

Assembly: DevExpress.Printing.v24.1.Core.dll

NuGet Package: DevExpress.Printing.Core

Declaration

public static class RangeParameterEditorOptions

Remarks

Date range parameters are used in reporting applications. The date range parameter editor provides a list of predefined ranges that users can select from.

Use the RangeParameterEditorOptions static class in WinForms and WPF applications to customize the list of predefined value ranges. The following members allow you to manipulate the predefined ranges:

Example

The code sample below uses a RangeParametersSettings class instance to create a date range parameter, set the range value to the last 7 days, and filter report data by this range. The code also clears the list of predefined date ranges and adds the September and October predefined ranges to the parameter’s editor.

A user specifies a start date and an end date. The custom **September** and **October** date ranges are available.

Note

This code is in effect for WinForms and WPF End-User Reporting Applications only.

using DevExpress.XtraReports.Parameters;
using DevExpress.XtraReports.Expressions;
// ...
// Remove all predefined ranges and add two new date ranges.
RangeParameterEditorOptions.PredefinedDateRanges.Clear();
RangeParameterEditorOptions.RegisterDateRange("September", () => new DateTime(2019,9,1), () => new DateTime(2019,9,30));
RangeParameterEditorOptions.RegisterDateRange("October", () => new DateTime(2019,10,1), () => new DateTime(2019,10,31));

Inheritance

Object
RangeParameterEditorOptions
See Also