Saturday, February 26, 2011

Adding columns to SSRS 2005 report Dynamically

  • I have a stored procedure that generates a list of columns and the associated data. 
  • The number of columns (and their names) may change from time to time. Because remote machine is in accessible. so Currently there are over 500 columns in the dataset.
  • Ultimately, I am comparing the min value of an item in each column to the max value of the item in the same column. If the data is the same it will not be displayed on the report, if it is different then we will display it on the report.
I cannot drag/drop 500 plus field onto the report and do an
                          IIF((Min(Fields!Value) <> Max(Fields!Value), "Show Min and Max Values", "") 
on each one because the field names may change the next time I run the report. I need to enumerate the columns (fields) returned by the stored procedure and add them to the report dynamically. 

In other words here  I'll have Three columns on the report: Field Name, Old Value and New value.

Does anyone know how to do this, it means generating such a report dynamically. 

Help me in doing this.



  1. This post is probably where I got the most useful information for my research. Thanks for posting, maybe we can see more on this.
    Are you aware of any other websites on this

  2. Can you please Tell me the Answer for that Question?
    I have the same Problem..... please give me the reply fast