We're using the ReportViewer control with the Standalone report designer in a VB.net website.
The designer's .trdx files are uploaded to the server, which are then serialised to XML and stored for later use. When the reports are run, we convert the report to a Telerik.Reporting.InstanceReportSource
like this (just the relevant code here, the objects also load parameters into the report object but the issues occur even when there are no parameters present in the report):
Private _ReportObject As Telerik.Reporting.Report
Private _oInstanceReportSource As Telerik.Reporting.InstanceReportSource
ReportObject =
DirectCast
(
New
Telerik.Reporting.XmlSerialization.ReportXmlSerializer().Deserialize(
New
System.IO.StringReader(_ReportXML)), Telerik.Reporting.Report)
_oInstanceReportSource.ReportDocument = ReportObject
We change the connection string to point to the local database and run the reports from there using code from the forum here, and bind the report to the control using the instanceReportSource
rptView.ReportSource = _oInstanceReportSource
rptView.DataBind()
We've made sure to only use the reporting engine data sources (sqldatasource) and we're able to change all the connection strings from whatever they were set up with in the report using code we pulled from the forums here.
So far, so good.
We have intermittent errors:
Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'Custom' mode
However, it's not consistent. Refreshing the page a few times (sometimes once, sometimes 12 or so refreshes) will eventually lead to the report working correctly.
It's a big production environment where we're using StateServer mode and using inProc session state isn't possible. It happens on our dev machines when we're using local IIS as well as our test server.