Report render error when called from ReportViewer Control

By Akbar

A few days ago I was looking at a weird report render issue, where one of the sub-report was being correctly rendered when called from the MS Report Server web management interface, but was giving the generic error “Subreport can not be shown” when called from the page using ReportViewer control. On debugging the issue, I found that Reporting Server, when called via web-service, was try to execute the SQL Server’s stored procedure using an account (due to Window’s Authentication mode) which didn’t had the EXECUTE permission for the that particular stored procedure. A quick fix is to just grant the EXECUTE permission to the stored procedures which are called by Reporting Server.

I also learned another tip during this debugging session, when you get the annoying “Subreport can not be shown” error, you can get the actual exception which is causing the problem by looking at the Debug/Output window in the Visual Studio when running the application in DEBUG mode.

Tags: , , ,