Wednesday, March 28, 2012

PDF rendering bug in SP2

We just upgraded to SP2 and some reports now fail to render in PDF format. They render successfully as HTML within IE, but exporting to PDF gives the following error:

An error occurred during rendering of the report. (rrRenderingError)

An error occurred during rendering of the report.

Non-negative number required. Parameter name: value

The log gives the following traceback:

at Microsoft.Reporting.WebForms.ServerReport.InternalRender(String format, String deviceInfo, String& extension, String& mimeType, String& encoding, String[]& streams, Warning[]& warnings)
at Microsoft.Reporting.WebForms.ServerReport.Render(String format, String deviceInfo, NameValueCollection additionalParams, String& mimeType, String& extension)
at Microsoft.Reporting.WebForms.ServerReportControlSource.RenderReport(String format, String deviceInfo, NameValueCollection additionalParams, String& mimeType, String& fileExtension)
at Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response)
at Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
aspnet_wp!library!6!17/04/2007-10:27:17:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams
aspnet_wp!library!5!17/04/2007-10:28:09:: i INFO: Call to RenderNext( '/EFaultReports/FaultReport' )
aspnet_wp!cache!5!17/04/2007-10:28:09:: i INFO: Session live: /EFaultReports/FaultReport
aspnet_wp!library!5!17/04/2007-10:28:23:: i INFO: Call to RenderNext( '/EFaultReports/FaultReport' )
aspnet_wp!reportrendering!5!17/04/2007-10:28:23:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.WrapperReportRenderingException: An error occurred during rendering of the report., ;
Info: Microsoft.ReportingServices.ReportProcessing.WrapperReportRenderingException: An error occurred during rendering of the report. > Microsoft.ReportingServices.ReportRendering.ReportRenderingException: An error occurred during rendering of the report. > System.ArgumentOutOfRangeException: Non-negative number required.
Parameter name: value
at System.IO.MemoryStream.set_Position(Int64 value)
at Microsoft.ReportingServices.Rendering.ImageRenderer.CanvasPDF.MonochromeJpeg(MemoryStream memStream)
at Microsoft.ReportingServices.Rendering.ImageRenderer.CanvasPDF.ProcessImage(CanvasImagePDF image, Double left, Double top, Double width, Double height, Boolean scaleImage)
at Microsoft.ReportingServices.Rendering.ImageRenderer.CanvasPDF.DrawImage(OutlineObjects outlines, CanvasImage image, Double left, Double top, Double width, Double height)
at Microsoft.ReportingServices.Rendering.ImageRenderer.Image.RenderToPage(Measurement parentClipBorder)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.RenderToPage(Measurement parentClipBorder)
at Microsoft.ReportingServices.Rendering.ImageRenderer.Table.TableCell.RenderToPage(Measurement parentClipBorder)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.RenderToPage(Measurement parentClipBorder)
at Microsoft.ReportingServices.Rendering.ImageRenderer.Table.TableRow.RenderToPage(Measurement parentClipBorder)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.RenderToPage(Measurement parentClipBorder)
at Microsoft.ReportingServices.Rendering.ImageRenderer.Table.RenderToPage(Measurement parentClipBorder)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.RenderToPage(Measurement parentClipBorder)
at Microsoft.ReportingServices.Rendering.ImageRenderer.Rectangle.RenderToPage(Measurement parentClipBorder)
at Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.RenderToPage(Measurement parentClipBorder)
at Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.ProcessPages(CompositionBase theComposition, Report theReport, Boolean needTotalPages, Int32 startPage, Int32 endPage, Boolean render)
at Microsoft.ReportingServices.Rendering.ImageRenderer.PdfReport.RenderReport(Report report, NameValueCollection deviceInfo, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStreamCallback, Int32 streamPageNumber)
at Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream)
End of inner exception stack trace
at Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshot(IRenderingExtension renderer, CreateReportChunk createChunkCallback, RenderingContext rc, GetResource getResourceCallback)
End of inner exception stack trace
aspnet_wp!library!5!17/04/2007-10:28:23:: Unhandled exception was caught: Microsoft.Reporting.WebForms.ReportServerException: An error occurred during rendering of the report. (rrRenderingError) > Microsoft.Reporting.WebForms.ReportServerException: An error occurred during rendering of the report. > Microsoft.Reporting.WebForms.ReportServerException: Non-negative number required.
Parameter name: value
End of inner exception stack trace
End of inner exception stack trace

Hi

We have got same problem and I have found that it happens with reports containing *.pjpeg images. Not all *.pjpeg gives this problem.

Please reply if anyone knows the fix. it is urgent

Thanks

Satjinder

sql

No comments:

Post a Comment