Skip to main content

Parameter.ExpressionBindings Property

Provides access to the parameter’s expression bindings collection.

Namespace: DevExpress.XtraReports.Parameters

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

NuGet Package: DevExpress.Printing.Core

Declaration

[Browsable(false)]
[XtraSerializableProperty(XtraSerializationVisibility.Collection, true, false, false, 0, XtraSerializationFlags.Cached)]
public BasicExpressionBindingCollection ExpressionBindings { get; }

Property Value

Type Description
BasicExpressionBindingCollection

The parameter’s expression bindings collection.

Remarks

The collection to which ExpressionBindings provides access stores BasicExpressionBinding elements for Parameter‘s properties. An expression that is parsed and processed to specify a property value:

A property’s expression binding overrides the PropertyName‘s value. Invalid values (for instance, an alphabetical value for an integer parameter) are converted to zero or empty values.

Tip

A basic expression binding’s visibility scope is limited to constants, operators, and date-time / logical / math / string functions.

Example

The code sample below illustrates how to create a date parameter with the current date as the default value and filter report data by the created parameter.

using DevExpress.XtraReports.Parameters;
using DevExpress.XtraReports.Expressions;
// ...
XtraReport1 report = new XtraReport1();

Parameter myDateParameter = new Parameter();
myDateParameter.Name = "myDateParameter";
// 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.
myDateParameter.Visible = false;
myDateParameter.Type = typeof(System.DateTime);
// Set the parameter's value to the current date.
myDateParameter.ExpressionBindings.Add(new BasicExpressionBinding("Value", "Today()"));
report.Parameters.Add(myDateParameter);
// Filter report data by the specified parameter.
report.FilterString = "GetDate([OrderDate]) = ?myDateParameter";
See Also