title: How do i represent an unknown number of columns in SSRS?
body: <p>I'm working on a rather complex report in Sql Server Reporting Services. My SP returns a dynamic number of columns each of which are dynamically named. </p>
  
  <p>Basically think of a time keeping application. Each column that is dynamic represents a time bucket that time was charged to for that team. If no time was charged to that bucket for the period of time the report covers it doesn't show. Each bucket has its own identifier which i need to be the column headers. </p>
  
  <p>I have an SP that returns this all. It does it by doing a bit of dynamic SQL with an exec statement (ugly i know but I'm on SQL 2000 so a PIVOT option wouldn't work) </p>
  
  <p>I can have an indefinite number of buckets and any or all might show. </p>
  
  <p>I found this - <a href="http://www.codeproject.com/KB/reporting-services/DynamicReport.aspx" rel="noreferrer">http://www.codeproject.com/KB/reporting-services/DynamicReport.aspx</a> - which is helpful but in the example he has a finite number of columns and he just hides or shows them according to which ones have values. In my case i have a variable number of columns so somehow i need the report to add columns. </p>
  
  <p>Any thoughts?</p>