Conditionally Hide Bands

This document provides the sample, illustrating how to hide bands if a certain logical condition is met. Note that no scripts are required to accomplish this task.

To demonstrate this feature, use a report with grouping, similar to the one created in the following tutorial: Grouping Data.

To conditionally hide bands in a report, do the following.

  1. Select the Group Header band and in the Properties Panel, Appearance category. Then, expand the Formatting Rules section and add a new formatting rule.

  2. Expand the newly created rule and set the Visible property to False. Condition property to specify the logical condition, which will define band visibility.

  3. In the invoked Expression Editor, [CategoryID] < 2) Save.

  4. Apply the formatting rule to the Group Header band by enabling the checkbox for this rule.

    Then, apply the same formatting rule to the report's Detail band.

Switch your report to the Preview mode and view the result.