corelibraries-devexpress-dot-xtrareports-dot-parameters-dot-parameter-f5fbd0ad.md
Provides access to the parameter’s expression bindings collection.
Namespace : DevExpress.XtraReports.Parameters
Assembly : DevExpress.Printing.v25.2.Core.dll
NuGet Package : DevExpress.Printing.Core
[Browsable(false)]
public BasicExpressionBindingCollection ExpressionBindings { get; }
<Browsable(False)>
Public ReadOnly Property ExpressionBindings As BasicExpressionBindingCollection
| Type | Description |
|---|---|
| BasicExpressionBindingCollection |
The parameter’s expression bindings collection.
|
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.
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";
Imports DevExpress.XtraReports.Parameters
Imports DevExpress.XtraReports.Expressions
' ...
Dim report As New XtraReport1()
Dim myDateParameter As 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 = GetType(Date)
' 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