question

kickinwing avatar image
kickinwing asked

SSRS executes SP with 24 Result Lines - How do I get all 24 results in SSRS?

I am converting reports from Brio to SSRS. Brio is using SP’s so I already have my data sources. SP has one parameter, the date (ex. ‘11/30/2010’). My only problem is that when the SP executes at the end there are 24 select statements, one for each 1 hour period of the day (12am-1am, 1am-2am, etc.) so I get 24 “results”. The Brio report handles this fine and I get the reports/charts I want. I am having a little trouble in SSRS figuring out how to get the same results. When I add this SP as my dataset and execute it, I only get back the results for first select statement of the 24 – 12am-1am. I do not want to rewrite all of the stored procedures, or have to change any of them. Any ideas how I can handle this in Reporting Services?
ssrsstored-procedures
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Kev Riley avatar image
Kev Riley answered
SSRS only will handle the first result set. [MSDN/BOL][1]: > Only the first result set that is retrieved for a stored procedure is supported. If a stored procedure returns multiple result sets, only the first one is used. You will need to either: - union the selects together - create new procs for each result set but if you don't want/can't change the procs, then you are stuck! In the meantime, go to [Connect][2] and vote this feature up! [1]: http://msdn.microsoft.com/en-us/library/dd220582(SQL.100).aspx [2]: http://connect.microsoft.com/SQLServer/feedback/details/125454/reporting-services-recognize-multiple-result-sets-returned-from-a-stored-procedure
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.