Report Parameters of Custom Types
You can set a report parameter’s type to a custom type - for instance, Enum or XPCollection.
The code sample below creates a Gender custom type and sets a parameter’s type to the created type.
using DevExpress.XtraReports.Parameters;
using DevExpress.XtraReports.UI;
// ...
public enum Gender { Male, Female }
// Create a report instance.
XtraReport report = new XtraReport();
// Create a new parameter.
Parameter param = new Parameter();
// Specify required properties.
param.Name = "GenderParameter";
param.Type = typeof(Gender);
param.Visible = true;
//Add the parameter to the report.
report.Parameters.Add(param);
See Create a Report Parameter for information on how to implement a custom parameter editor in your application.
Tip
See Store Report Layouts for information on how to serialize your custom parameters together with the report definition.sf