reporting-servicesreportingreportviewerssrs-2008-r2report-viewer2010

How to fix the gap after hiding a column in SSRS 2008


That might be simple but I couldnt solve it for hours.

I use Microsoft Reporting Services 2008 R2 and ReportViewer 2010. I have a table in one of my reports having three columns like:

Name Age Gender
Jack 20   M

What I want is to hide Age column based on a parameter. I am doing it by giving it an hidden expression like:

=IIF(Parameters!check.Value=1,true,false)

However, when the column becomes hidden the output is:

Name          Gender
Jack          M

THere is a gap between name and gender now. I need to have an output like

Name Gender
Jack M

without gap. I couldnt manage to provide it. Any help would be appreciated.


Solution

  • It should work if you select the entire column, right click and go to Column visibility... menu then set that expression in the Show or hide based on an expression textbox.

    enter image description here

    enter image description here