Hi,
I developed a report that works fine in my environment. However, when moving it to another server I get the error code below.
<System_Error>An error occurred during local report processing. StackTrace: at Microsoft.Reporting.WebForms.LocalReport.EnsureExecutionSession() at Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, PageCountMode pageCountMode, CreateAndRegisterStream createStreamCallback, Warning[]& warnings) at Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, PageCountMode pageCountMode, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings) at Microsoft.Reporting.WebForms.LocalReport.Render(String format, String deviceInfo, PageCountMode pageCountMode, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings) at Microsoft.Reporting.WebForms.Report.Render(String format, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings) at GetCustomerReport(Int64 IdentificationNumber) in C:\ Leads.vb:line 124 at MarketingServices.WSReports.GetReport(String IdentificationNumber, String Password) in C:\ WSReports.asmx.vb:line 35
It fails in the line as I don't get any error when this line is commented:
Dim bytes As Byte() = rpViewer.LocalReport.Render("PDF", Nothing, mimeType, encoding, extension, streamids, warnings)
Here is my code:
Public Function GetCustomerReport(IdentificationNumber As Int64) As Byte() Dim LeadsDAL As New Leads() Dim CustomerDS As DataSet = LeadsDAL.GetCustomerReportDataSet(IdentificationNumber:=IdentificationNumber) If CustomerDS Is Nothing Then Throw New ApplicationException(String.Format("no data for IdentificationNumber:{0}", IdentificationNumber)) End If Dim rpViewer As New ReportViewer() rpViewer.Reset() rpViewer.LocalReport.ReportPath = "Common\Reports\ReportTest.rdlc" rpViewer.LocalReport.DataSources.Add(New ReportDataSource("DsMemberDetails", CustomerDS.Tables(0))) rpViewer.LocalReport.DataSources.Add(New ReportDataSource("DsProductDetails", CustomerDS.Tables(1))) rpViewer.LocalReport.DataSources.Add(New ReportDataSource("DsGraphs", CustomerDS.Tables(2))) rpViewer.LocalReport.DataSources.Add(New ReportDataSource("DsBarChart", CustomerDS.Tables(3))) rpViewer.LocalReport.DisplayName = "xxxx" rpViewer.ProcessingMode = ProcessingMode.Local 'Export to pdf Dim warnings As Warning() = Nothing Dim streamids As String() = Nothing Dim mimeType As String = Nothing Dim encoding As String = Nothing Dim extension As String = Nothing Dim bytes As Byte() = rpViewer.LocalReport.Render("PDF", Nothing, mimeType, encoding, extension, streamids, warnings) Return bytes