SSRS 2005/2008 Error handling
I have an SSRS Report that generates an error when there are no rows retturned to a report. This report has a variety of user selectable parameters. In also has a parmeter that is used to populate a sub title in the header of the report that is dependent upon a value included in the return set provided by the Stored Procedure. It works great as long as some results are returned, but when no rows are returned. The report fails and an error is posted indicating that Parameter!SubTitle is missing a value. How can I stop this message from appearing when no rows are returned?
October 19th, 2012 12:25pm

What is the error? Is the parameter fedIs your dataset MDX? or TSQL? If TSQL then you can add a default row to the results using the UNION statement (http://msdn.microsoft.com/en-us/library/ms180026.aspx). MDX also has a union statement but I am not familiar with its usage. If the parameter is what throws the error, is it multivalue? if not just allow null value. If it is you have to provide a default.
Free Windows Admin Tool Kit Click here and download it now
October 19th, 2012 4:18pm

Hi JLFDTW, In Reporting Services, if we set a parameter to get data from a query and the query returns no result set, the parameter validation will fail. In this issue, I recommend that you alter the stored procedure to insert the result into a temporary table and counting the number of rows. If no row is returned, we could use an extra select statement to make the stored procedure return an custom row. Reference: http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/789127e8-1716-43ce-8770-ceefa04eb005/ Hope this helps. Regards, Mike Yin TechNet Subscriber Support If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.Mike Yin TechNet Community Support
October 21st, 2012 11:36pm

Shortly after posting I did figure it out and the fix was as you have suggested as simple as allowing a NULL. Thank you for your response. JLFDTW
Free Windows Admin Tool Kit Click here and download it now
October 22nd, 2012 7:11am

Thanks for the update. Glad it was a quick fix. Please mark appropriate response as answer to assist others in finding answers to their own similar questions.
October 22nd, 2012 10:59am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics