Geeks With Blogs
Stephen Myers Good Times with .Net

So today I ran across the dreaded "Error: Subreport could not be shown."   The odd thing was that the report and subreport executed fine in business intelligence studio, yet this problem arose when the report was deployed to the SSRS server.  The key to broken subreports that execute fine in stand-alone mode are the report parameters passed in from the root report to the subreport.  A little background:  The subreport was being called iteratively in a table where each row in the table contained the subreport based on the result set of a SQL query.  The subreport took two parameters, one that resolved using the Fields! of the SQL query for the table itself, and the other was one of the parameters of the root report, just passed down to the subreport.  It turns out that while the Fields! parameter resolved just fine, the report parameter did not resolve in the stage environment for some reason.  Luckily for me, this parameter was useless in the case that the report was being run as a subreport, so I just removed it.  This problem was further obfuscated by the caching performed by SSRS.  That "Overwrite Existing" checkbox on the upload reports screen does not clear the database level caching that SSRS does, and even an IISreset and resetting the SSRS service itself didn't clear the cache.  I found that deleting the report and then re-uploading it worked just fine to "clear the cache".  Problem solved, good times :)

Posted on Friday, October 10, 2008 8:23 AM | Back to top


Comments on this post: SSRS Subreports

# re: SSRS Subreports
Requesting Gravatar...
Thanks a lot..it worked for me :)
Left by Rajesh S on Mar 29, 2010 1:46 AM

Your comment:
 (will show your gravatar)
 


Copyright © smyers | Powered by: GeeksWithBlogs.net | Join free