I have a query that returns data like below from multiple databases. CoursesTaken is dynamic and can change with time with new courses added/removed.
====== ======= ============ ============= ======= =========
Name ID Courses Col1 Col2 Taken
====== ======= ============ ============= ======= =========
John 23 math x y yes
John 23 Chemistry t u yes
Mary 40 math x u yes
====== ======= ============ ============= ======= =========
I want to pivot this on Courses so that it looks like below
Name ID Math Chemistry Col1 Col 2 and so on
John 23 yes yes
Mary 40 yes no
I think for ssrs this can only be done from matrix so any changes to sql won't really help as courses are dynamic so how do I achieve the above?
EDIT Dynamic pivot or any pivot outside ssrs matrix won't help as any pivot needs to be done from within ssrs.
Thanks