RangeParametersSettings Class
Provides the nested start and end parameters for a report‘s range parameter.
Namespace: DevExpress.XtraReports.Parameters
Assembly: DevExpress.Printing.v25.2.Core.dll
Declaration
Remarks
The RangeParameterSettings class allows you to configure a date and time range parameter‘s nested start and end parameters.
Assign a RangeParametersSettings class instance to a parameter’s ValueSourceSettings property to specify that the parameter represents a range. You can also set the parameter’s ValueSourceSettings property to:
- a StaticListLookUpSettings class instance - to specify a static list of the parameter’s predefined values.
- a DynamicListLookUpSettings class instance - to specify the storage to retrieve the list of predefined parameter values.
Set the following properties to specify the date range:
- the RangeParametersSettings.StartParameter property specifies a range’s start parameter.
- the RangeParametersSettings.EndParameter property specifies a range’s end parameter.
Set the the parameter’s Type to DateTime, DateOnly, or TimeOnly depending on your requirements.
- Predefined ranges for “Date” and “Date and Time” range parameters

- Predefined ranges for “Time” range parameters

In WinForms and WPF applications, you can use the RangeParameterEditorOptions static class to customize the list of 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.
using DevExpress.XtraReports.Parameters;
using DevExpress.XtraReports.Expressions;
// ...
XtraReport1 report = new XtraReport1();
// Create a date range parameter.
Parameter myDateRange = new Parameter();
myDateRange.Name = "myDateRange";
myDateRange.Description = "Date Range:";
// Set the Visible property to true to request the parameter value from users.
// Set this property to false to silently apply the parameter's value.
myDateRange.Visible = false;
myDateRange.Type = typeof(System.DateTime);
RangeParametersSettings myDateRangeSettings = new RangeParametersSettings();
myDateRangeSettings.StartParameter.Name = "MyDateRangeStart";
// Set the range parameter's start date to 7 days ago.
myDateRangeSettings.StartParameter.ExpressionBindings.Add(new BasicExpressionBinding("Value", "AddDays(Today(), -7)"));
myDateRangeSettings.EndParameter.Name = "MyDateRangeEnd";
// Set the range parameter's end date to today.
myDateRangeSettings.EndParameter.ExpressionBindings.Add(new BasicExpressionBinding("Value", "Today()"));
myDateRange.ValueSourceSettings = myDateRangeSettings;
report.Parameters.Add(myDateRange);
// Filter report data by the specified start and end dates.
report.FilterString = "GetDate([OrderDate]) Between(?MyDateRangeStart,?MyDateRangeEnd)";