Skip to main content
A newer version of this page is available. .

Parameter.SelectAllValues Property

Specifies whether to use all values of a multivalue parameter as defaults.

Namespace: DevExpress.XtraReports.Parameters

Assembly: DevExpress.Printing.v21.2.Core.dll

NuGet Package: DevExpress.Printing.Core

Declaration

[DefaultValue(false)]
public bool SelectAllValues { get; set; }

Property Value

Type Default Description
Boolean false

true to use all values as defaults; otherwise, false.

Example

The code sample below demonstrates how to do the following:

  1. Create a multi-value report parameter.
  2. Configure a DynamicListLookUpSettings class instance to load predefined values for this parameter from a database.
  3. Select all predefined parameter values as defaults.

A multi-value parameter with all selected predefined values

using DevExpress.XtraReports.Parameters;
// ...
// Create a parameter and set up its properties. Set the
// parameter's MultiValue property to true to make it multi-value.
var parameter1 = new Parameter() {
    Name = "categories",
    Description = "Categories: ",
    Type = typeof(System.Int32),
    MultiValue = true
};

// Create a DynamicListLookUpSettings class instance and
// configure its properties to retrieve the parameter's predefined values
// from the report's data source.
var lookupSettings = new DynamicListLookUpSettings() {
    DataSource = report.DataSource,
    DataMember = "Categories",
    DisplayMember = "CategoryName",
    ValueMember = "CategoryId"
};

// Assign the setting to the parameter's LookUpSettings property.
parameter1.LookUpSettings = lookupSettings;

// Enable the parameter's SelectAllValues property to use
// all predefined values as defaults.
parameter1.SelectAllValues = true;
See Also