I have other reports, using other stored procedures on other databases, working without difficulty. I was even able to create the desired report by putting all of the script in the SSRS report, instead of in a stored procedure.
For ease of maintenance, I prefer to have script in stored procedures, so it can be updated without editing the SSRS report, but, in this instance, the stored procedure works from SSMS, but I get “ExecuteReader requires an open and available Connection. The connection’s current state is closed.” when I tell the report to use the stored procedure, instead of script.
enter image description here
I hate mysteries, so I hope someone can tell my why this error occurs. The fact that the script runs, from the same report, proves the connection is fine and my internet search failed to find an answer.
Thank you,
Andy
Andy Lindquist is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.