Quantcast
Channel: SQLServerCentral » Reporting Services » Reporting Services » Latest topics
Viewing all articles
Browse latest Browse all 2791

Dynamic Columns Based on Multi-Select Parameter

$
0
0
I've just been developing a few reports in SSRS and have an issue I need to work out. Not sure if I'm on the right path. What I would like to do is allow users to select a date group/groups from a parameter list and then have each parameter show as the column header in proper order.For example, the list would look something like "11/12", "12/13", "13/14", 2011, 2012, 2013, 2014, 2014Q1, 2014Q2. So a user would pick "12/13" and "13/14". The resulting report would look like. Item 12/13 13/14A 6 6B 25 24C 99 99Total xxxx xxxxThey could pick 5 parameters so there would be 5 columns, or just one parameter and there would be just one column.The formula for the datafield for column 1 would read something like =Sum(iif(DateGroup=Parameter1.value,itemcount.value,0)) and the header expression would be parameter1.value.In my contemplation on this, there would be a "order" value assigned to each DateGroup parameter so they show in the right column order. Is this even possible? If so, would it be some kind of "loop" that would take the count of parameters to develop the columns? Or would I set up say 8 columns and then hide anything that isn't used based on the parameter count?I've done a lot of searching but, haven't come across anything yet that fits this idea. Thanks for your input.

Viewing all articles
Browse latest Browse all 2791

Trending Articles