How to dynamically add columns to the layout of a reporting services report

skaleem1 used Ask the Experts™
I have a query:

Select * from TableNm

The first two columns returned by the query will always be the same. However, the remaining column names and column numbers will vary everytime I run the query from tableNm table as the table structure is going to be modified every week by dropping and recreating the table.

I want to display the results of the query in a reporting services .rdl file. How can I dynamically modify/refresh the header names of the same layout in the .rdl file every time I generate the report by running the select query above. Can someone please guide me with a solution?

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Sr Database Engineer
There is not an easy way to do this. But have you tried exploring the matrix control?


How would using a matrix control overwrite the column layout of an existing report that is based on a dataset, can you please walkthrough/elaborate?
Faiga DiegelSr Database Engineer


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial