SSRS - [ Hide/UnHide Columns and Shrink the Remaining Columns By Using Parameter in SSRS Report ]


We have created report as shown below but our users request that they want to have a parameter by using that they should be able to hide the Modified Date and Document Summary columns and unhide as well by changing the value of parameter.

Solution : 

Step 1: 
Lets create a parameter called Pra_HideDetails and choose the type boolean as shown below

Step 2: 
Click on Drop down arrow and choose Advance mode as shown below

Step 3:
click on the second Static ( Modified Date) under Group and write expression as shown below

Step 4: 
Click on Last Static under Column Group ( Document Summary) and write expressions as shown in Step 3.

Final Output : 

Lets preview our report by using Parameter value True or False and see if everything working as expected.

As we can see below when we provided True value to Parameter, The report is only displaying 3 columns and excluded modified date and document summary columns.

When we provided False value to Parameter, We can see all the columns

1 comment: