SSRS : Dynamic Columns in Tablix

Here i want to give a small demo to select Table columns dynamically in SSRS 2012 .

First i have Created Test table and inserted some values  as shown below .












In Report  Create a Parameters called SelectColumns  .
In SelectColumns Parameter add the columns availble in table as shown below




Create a Dataset Main  with the select query of all fileds in a table .
Once data set is created use Expression to get the Query from query parameter

Create  expression   on aviable values
=
"select "+ Join(Parameters!SelectColumns.Value,",")+" from ODS_Schema.TestDynamic "

 Create a table and select all columns in that table . and Update the column visibilty property of each column as  below
=iif(count(Fields!a.Value)=0,true,false)





and do the same for all columns
and see the result .




Comments

Popular posts from this blog

SSAS : A connection cannot be made to redirector. Ensure that 'SQL Browser' service is running. (Microsoft.AnalysisServices.AdomdClient). + Solution

SSIS Error : Unable to infer the XSD from the XML file. The XML contains multiple namespaces