Reputation: 131
In my app I have a chart that is stored in Reporting Services, there is a method called 'RenderStream' which is called but it gives the following error:
"System.Web.Services.Protocols.SoapException was unhandled by user code Message="System.Web.Services.Protocols.SoapException: The selected report is not ready for viewing. The report is still being
rendered or a report snapshot is not available. ---> Microsoft.ReportingServices.Diagnostics.Utilities.ReportNotReadyException: The
selected report is not ready for viewing. The report is still being rendered or a report snapshot is not available.\n at
Microsoft.ReportingServices.WebServer.ReportExecution2005Impl.RenderStream(String Format, String StreamID, String DeviceInfo, Byte[]&
Result, String& Encoding, String& MimeType)\n at Microsoft.ReportingServices.WebServer.ReportExecutionService.RenderStream(String
Format, String StreamID, String DeviceInfo, Byte[]& Result, String& Encoding, String& MimeType)"
Has anyone come across this error before?
Many thanks in advance, Chris.
Upvotes: 5
Views: 1367
Reputation: 1053
Due to very limited documentation around the usage of RenderStream(), I was receiving this error, but I found a resolution. RenderStream() requires a StreamId to pass to it. You receive an array of those id's from the Render() method. Hence, you must call Render() prior to calling RenderStream(). Additionally, Render() returns an ExecutionId in the ExecutionHeader. This ID must be passed in the RenderStream() method, also wrapped in an ExecutionHeader object. Once I did that, the error went away and the report generated the image I was looking for. Hope this helps someone out there.
Upvotes: 2
Reputation: 1790
Try Disabling Snapshot Isolation
ALTER DATABASE AdventureWorks SET ALLOW_SNAPSHOT_ISOLATION = OFF
Upvotes: 0