Search code examples
telerik-reporting

Telerik Report - how to hide panels if table/list is empty


I am working on Telerik Reporting and I need to hide panels when the list I use by ObjectDataSource is empty. How can I handle it? Those blue are panels, and just below the lists. But they are not together, do I have to connect them by something like subreport?

enter image description here


Solution

  • You will probably be able to solve this with Conditional Formatting. Create a new conditional formatting rule for the panel you want to hide. For the rule's filter you can use a Count() function on one of the fields in your data source and check if the result is 0. In other words the rule will only apply in cases where you have 0 records:

    enter image description here

    Then for the style of this rule open the "Style builder..." and uncheck "visible" under the layout section:

    enter image description here

    Hope this helps.