How to Show or Hide a Report Item with a Boolean Parameter in Bold Reports
In Bold Reports, you can use a Boolean parameter to show or hide a report item, such as a Tablix, while the report is being viewed. This lets readers choose which sections they want to see, so each person gets a cleaner, more relevant report. This functionality applies to the Web Report Designer and Standalone Report Designer.
Steps to Control Report Item Visibility Using a Boolean Parameter
Step 1: Create a New Parameter
-
Open your report in the Bold Reports Web Designer or Standalone Report Designer and go to the Parameters section.
-
Click New Parameter to add a parameter.
Step 2: Configure the Boolean Parameter
-
Enter a name for the parameter (for example,
TablixVisibility). -
Set the Data Type to Boolean.
-
(Optional but Recommended) Set a Default Value (e.g., True) so the report item is visible by default when the report is first opened.
-
Select Allow null value.
-
Click Save to create the parameter.
Step 3: Open the Visibility Expression Editor
-
Select the report item you want to control (for example, a Tablix).
-
In the Properties panel, go to the Visibility section.
-
Click the expression box (the fx icon) next to Hidden to open the Expression editor.
Step 4: Set the Visibility Expression
-
Enter the following expression and click OK to save it:
=IIF(IsNothing(Parameters!TablixVisibility.Value), True, Not Parameters!TablixVisibility.Value) -
The Hidden property requires a True value to hide the item and False to show it.
- If the parameter is True, the expression returns False (Item is Shown).
- If the parameter is False, the expression returns True (Item is Hidden).
- If the parameter is null (IsNothing), the expression returns True (Item is Hidden).
Note: Replace TablixVisibility with the name of your own parameter.
Step 5: Preview and Test the Report
-
Save the report.
-
Switch to Preview mode.
-
Change the value of the Boolean parameter and check the result:
- True: The report item is visible.
- False: The report item is hidden.
Result
Once configured, the report dynamically toggles the visibility of the selected item based on user input. This creates an interactive experience where users can customize their view without needing multiple report versions.
You can download the sample report here.