An error occurred during local report processing.

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

September 9th, 2015 3:00am

Hi,

From your description, I see that you run the application localhost and the report view works fine.

Then it would not work after deployed to production server. From the error message, I think you should include some

necessary libraries like below.

http://stackoverflow.com/questions/16766710/why-throws-me-an-error-local-report-services-in-mvc-when-is-deployed

This is a known issue, please check below links.

http://forums.asp.net/t/1433131.aspx

http://social.msdn.microsoft.com/Forums/en-US/59146046-fecf-474b-83c0-952eb3a52394/urgent-error-with-microsoftreportingwebformslocalreportinternalrender?forum=vsreportcontrols

 

Hope this helps. Thanks.

Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 3:38am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics