All docs
V20.1
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

RangeStartParameter Class

A range parameter's nested start parameter in a report.

Namespace: DevExpress.XtraReports.Parameters

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

Declaration

public class RangeStartParameter :
    RangeBoundaryParameter
Public Class RangeStartParameter
    Inherits RangeBoundaryParameter

Related API Members

The following members accept/return RangeStartParameter objects:

Remarks

RangeStartParameter is a date range parameter's nested parameter that specifies the range's start date.

An instance of RangeStartParameter is created when you instantiate the RangeParametersSettings class. Use the RangeParameterSettings.StartParameter property to access the RangeStartParameter instance.

Specify the following properties to configure a date range parameter's nested start parameter:

  • Name - the parameter's name that you can use to refer to the parameter.
  • Value - the parameter's value.
  • ExpressionBindings - the parameter's expression bindings collection.

Examples

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 apply the parameter's value that is specified in code.
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)";
See Also