ParametersRequestValueChangedEventArgs.ChangedParameterInfo Property
Contains information about the parameter, which value was changed.
Namespace: DevExpress.XtraReports.Parameters
Assembly: DevExpress.Printing.v24.1.Core.dll
NuGet Package: DevExpress.Printing.Core
Declaration
Property Value
Type |
---|
DevExpress.XtraReports.Parameters.ParameterEditInfo |
Example
This example demonstrates how to perform report parameter validation, and restore the previous parameter value if the validation fails (if the parameter value is greater than 10 or less than 0).
This is achieved by handling the report’s XtraReport.ParametersRequestSubmit and XtraReport.ParametersRequestValueChanged events.
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using DevExpress.XtraReports.Parameters;
// ...
namespace CancelSubmitParameters {
public partial class XtraReport1 : XtraReport {
int parameter;
public XtraReport1() {
InitializeComponent();
}
private void XtraReport1_ParametersRequestSubmit(object sender,
ParametersRequestEventArgs e) {
if ((int)e.ParametersInformation[0].Parameter.Value > 10 ||
(int)e.ParametersInformation[0].Parameter.Value < 0) {
e.ParametersInformation[0].Parameter.Value = parameter;
e.ParametersInformation[0].Editor.Text = parameter.ToString();
}
}
private void XtraReport1_ParametersRequestValueChanged(object sender,
ParametersRequestValueChangedEventArgs e) {
parameter = (int)e.ChangedParameterInfo.Parameter.Value;
}
}
}
See Also