SSRS 2008 Dynamic Columns in a Matrix Report?
I have SQL 2008 (not R2). I would like to have a matrix rep开发者_运维技巧ort where user can select one of the SQL resultset columns to be the matrix column group..
For example
A B Value
a1 b1 10
a2 b2 20
a3 b2 30
So the possible matrices could be (user selects from dropdown with A, B).
By A
a1 a2 a3
Value 10 20 30
By B
b1 b2
Value 10 50
This question should solve your problem. It is a way to use a parameter to refer to a field in your dataset.
i havne't actually done anything like this before, but i have a theory that you can modify the expression on the group to have an iif statement to change which field is grouped on
so, for the column group, change the expression for the gorup to something like =iif(ParameterValue=1,Field1,Field2)
精彩评论