Skip to main content

Parameter.Visible Property

Specifies whether a parameter editor is visible in the Parameters panel.

Namespace: DevExpress.XtraReports.Parameters

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

NuGet Package: DevExpress.Printing.Core

Declaration

[DefaultValue(true)]
public bool Visible { get; set; }

Property Value

Type Default Description
Boolean true

true to show a parameter editor; otherwise, false.

Remarks

All hidden parameters are submitted to a report with default values. You can also submit default values for all report parameters (visible and hidden) when you open a report Preview. For this, disable the report’s RequestParameters property.

Example

The following example hides an editor of the Company parameter.

Visible = true (Default) Visible = false
Visible = true (Default) Visible = false
using DevExpress.XtraReports.Parameters;
// ...
report.Parameters["company"].Visible = false;

You can also specify an expression for the Visible property to show/hide a parameter editor based on a value of another parameter.

Show/hide a parameter editor based on a value of a different parameter

using DevExpress.XtraReports.Parameters;
// ...
using DevExpress.XtraReports.Expressions;
// ...
report.Parameters["company"].ExpressionBindings.Add(
    new BasicExpressionBinding() {
        PropertyName = "Visible",
        Expression = "!IsNullOrEmpty(?customer)",
    }
);

The following code snippets (auto-collected from DevExpress Examples) contain references to the Visible property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also