Articles in this section
Category / Section

How to Hide Columns if the Data is Empty in the Tablix

Published:
Updated:

In Bold Reports, you have the ability to control the visibility of a tablix column depending on the presence or absence of data. This feature allows you to effectively manage the display of columns by setting the visibility property and utilizing expressions. This article provides a step-by-step guide on achieving this behavior in your reports.

Steps to hide the column if tablix contains empty data:

  1. Open the Bold Reports designer, select the tablix, enable the advanced mode, and then set the visibility expression for the columns to hide them when they contain empty data.

    image.png

    image.png

  2. In the properties window or pane, locate the Visibility property. Next, click on the expression button (a white box) adjacent to the Visibility property.

    image.png

  3. This action will open the Expression Editor, where you can define the logic for hiding the column based on data presence. Within the Expression Editor, enter the following expression, selecting the field that indicates the absence of data:

    image.png

        =IsNothing(<Your_field_name>)
    

    For example,

        =IsNothing(Fields!Clothing.Value)
    
  4. Click on the OK option to save the Expression Editor.

  5. Save your report and proceed to preview it. Observe the visibility of the column, which will now adjust dynamically based on the availability of data.

    image.png

Note: The IsNothing(Fields!Test_name3.Value) expression evaluates to True when the field value is null or empty, and False when it contains data. By setting the Visibility property to False, the column will be hidden when the expression evaluates to True.
By following the steps outlined in this knowledge base article, you can easily hide a column dynamically in Bold Reports when the associated tablix contains no data. The utilization of the IsNothing() function within an expression provides you with the flexibility to control column visibility based on data presence. Implementing this technique enhances the visual appearance and usability of your Bold Reports projects.

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied