0

I have a report that Show or Hide certain report column based on the parameter selected. I have a table grid in SQL that should control which column to hide and which column to show when the report is rendered. The parameter to control the show or hide column is the Name column so if for example, Standard metric is select then show columns where value of each column is 1 and hide columns where value is 0, but not sure how to call it in column visibility expression. Currently, below is how I call the parameter to hide columns.

How do I hide the column based on each column numeric value because having the name showing as a parameter selection I don't know how to incorporate the numeric value (1 or 0) in the column visibility expression.

=iif((Parameters!ShowAllClientMetrics.Value = "Expanded" OR Parameters!ShowAllClientMetrics.Value = "Standard" OR Parameters!ShowAllClientMetrics.Value = "VA"), True, False)

enter image description here

Arsee
  • 651
  • 2
  • 11
  • 36

1 Answers1

0
  1. Create a dataset (lets call it ColumnShowHide that reads the show/hide table (lets call it tableShowHide) using the selected parameter e.g. select * from tableShowHide where Name=@parameter this dataset should return only one row.

  2. On every show/hide column select column visibility -> Show or Hide based on an expression and enter the selection expression/ e.g. =iif(Sum(Fields!Offered.Value, "ColumnShowHide")=0,true,false)

Jayvee
  • 10,670
  • 3
  • 29
  • 40
  • I created a SQL metric table with all the report header fields with a value of 1=show; 0=hide and it worked! thanks. – Arsee Jun 15 '17 at 21:36