Search code examples
reporting-services.net-2.0

Hide a tablerow in a .NET rdlc report if the field represented in the row is empty?


Possible Duplicate:
How to collapse a row in RDLC rather than just hide it?

I see the tablerow.Visibility property and another property called 'ToggleItem' but am not sure how to make this work. I want to hide the tablerow dynamically if it's only text field (in this case a user comment field) is empty. 'CanShrink' doesn't seem to do the job.

The tablerow is .25 inches high and it takes up this much space even if there is no data to display. Therefore, I end up with .25 inch gap between every row on the report.

I am using Visual Studio 2005 with the built in rdlc reports capability.


Solution

  • Just set Hidden property to True or False or some expression.

    = (Fields!UserComment.Value.ToString() = "")  
    

    See Expression Examples (Reporting Services)