I have a task to take an existing stored procedure and make it an SSRS report. Note that I did not write the sp and don't understand it fully. It is making a pivot table. I think where the difficulty lies is the columns are dynamic and there can be a lot of them. The columns are a list of store numbers and if a particular store has no data, it is skipped. So let's say store numbers 1 through 10 exist in our database. If I run the sproc with one set of input, I may get a dataset back with columns for store number 1 and 2. Another set of input gives me data back for stores 1, 2 8 and 10. So the columns are always variable. (In reality, there are hundreds of stores, not a handful).
When I try creating the report in SSRS, by default it knows I have a field name ID0000, source name 0000 and fieldname ID9999, source name 9999. When I run the sp in SSMS, I get a boatload of dynamic columns and the first one is column name 0000 and the last is column name 9999. So what SSRS is doing kind of makes sense. I can manually add columns to the report, like 0001, 0002, and as I do, my report grows and looks more like the dataset returned by the sproc. But it is forcing me to explicitly list the columns. And with different input, maybe column 0002 won't have any data to report.
Is my explanation clear? Is my problem solvable? My boss is thinking that the dynamic nature of the sproc and pivot table perhaps can't be handled by SSRS.