In MS SQL 2008 R2 DB, I have a table:
Name, Value, Type
A, 1, T1
B, 2, T1
C, 3, T1
D, 4, T1
A, 10, T2
B, 20, T2
C, 13, T2
D, 45, T2
A, 11, T3
B, 22, T3
C, 33, T3
D, 44, T3
What I want to do is to get this:
Name, Type
T1, T2, T3
A, 1, 10, 11
B, 2, 20, 22
C, 3, 13, 33
D, 4, 45, 44
From the query, I can return this:
Name, Value, Type
A, 1, T1
B, 2, T1
C, 3, T1
D, 4, T1
A, 10, T2
B, 20, T2
C, 13, T2
D, 45, T2
A, 11, T3
B, 22, T3
C, 33, T3
D, 44, T3
Now I want to take this data and in SSRS, transform it into this form:
Name, Type
T1, T2, T3
A, 1, 10, 11
B, 2, 20, 22
C, 3, 13, 33
D, 4, 45, 44
Types can change from one execution to another.
The way I see it, you have 2 options here:
You can modify your query using PIVOT to transpose the rows into columns
http://msdn.microsoft.com/en-us/library/ms177410.aspx
Or you can simply create a ‘Matrix’ report. Where
Nameis your Row value,typeis your column value andvalueis your details value.