Reporting Services PDF Export Fails
Hello, Was wondering if anyone has come across the following issue. I am generating reports using SQL Server 2005 w/ SP2 and SSRS. The reports are being accessed via the Web Viewer Client however my problem also occurs from url access as well as from the report designer in VS 2005 running in preview mode. The problem only happens once in a while and only with the PDF export type. I have isolated the cause to the images in the report. One of the reports in question has two images on is 520k jpg and the other is a 720k jpg. If I remove the smaller image the report will print. I can also point both images parameters at the good image (larger one) and it will print. If I swap out the bad image with an image in a working report that report also will not export. The exact error returned is below. If anyone has any thoughts on this id love to hear them! Thanks Bill Non-negative number required.Parameter name: value Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Exception: Non-negative number required.Parameter name: valueSource Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [Exception: Non-negative number required.Parameter name: value][Exception: An error occurred during rendering of the report.][Exception: An error occurred during rendering of the report.] Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean isAbortable, String url, Stream outputStream, String& mimeType, String& fileNameExtension) +503 Microsoft.Reporting.WebForms.ServerReport.InternalRender(Boolean isAbortable, String format, String deviceInfo, NameValueCollection urlAccessParameters, Stream reportStream, String& mimeType, String& fileNameExtension) +959 Microsoft.Reporting.WebForms.ServerReport.Render(String format, String deviceInfo, NameValueCollection urlAccessParameters, String& mimeType, String& fileNameExtension) +81 Microsoft.Reporting.WebForms.ServerReportControlSource.RenderReport(String format, String deviceInfo, NameValueCollection additionalParams, String& mimeType, String& fileExtension) +126 Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +143 Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +153 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
May 30th, 2008 4:45pm

I am having the same problem. It only happens on PDF export with externally linked images in the report. I have been searching for a solution to no avail. Let me know if you find a solution.Thanks,Brian Bergstrom
Free Windows Admin Tool Kit Click here and download it now
June 17th, 2008 10:15pm

I'm also having the same problem with local reports using the winforms ReportViewer.Did you perhaps find a solution yet?
August 18th, 2008 3:49pm

Same problem, any solution yet? Thanks.
Free Windows Admin Tool Kit Click here and download it now
December 11th, 2008 8:52pm

This is a bug in the SSRS 2005 PDF Renderer thatis scheduledto be fixed in CU12. CU12 should be available around March 09.It only happens with certain JPG images.One workaround is to convert the images used in the report to another format like PNG.Thanks,Andre
December 15th, 2008 9:04pm

I'm getting a similar errorwhen exporting a PDF using version 9 of the report viewer control from my website. My PDF also references jpg images. Does anyone have any suggestions other than converting all my jpgs to pngs?Thanks,Robert Non-negative number required.Parameter name: value Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentOutOfRangeException: Non-negative number required.Parameter name: valueSource Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [ArgumentOutOfRangeException: Non-negative number required. Parameter name: value] System.IO.MemoryStream.set_Position(Int64 value) +7679482 Microsoft.ReportingServices.Rendering.ImageRenderer.CanvasPDF.MonochromeJpeg(MemoryStream memStream) +327 Microsoft.ReportingServices.Rendering.ImageRenderer.CanvasPDF.ProcessImage(CanvasImagePDF image, Double left, Double top, Double width, Double height, Boolean scaleImage) +1494 Microsoft.ReportingServices.Rendering.ImageRenderer.CanvasPDF.DrawImageUnscaled(OutlineObjects outlines, CanvasImage image, Double left, Double top, Double width, Double height) +164 Microsoft.ReportingServices.Rendering.ImageRenderer.Image.RenderToPage(Measurement parentClipBorder) +1360 Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.RenderToPage(Measurement parentClipBorder) +251 Microsoft.ReportingServices.Rendering.ImageRenderer.TableCell.RenderToPage(Measurement parentClipBorder) +34 Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.RenderToPage(Measurement parentClipBorder) +251 Microsoft.ReportingServices.Rendering.ImageRenderer.TableRow.RenderToPage(Measurement parentClipBorder) +34 Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.RenderToPage(Measurement parentClipBorder) +509 Microsoft.ReportingServices.Rendering.ImageRenderer.Table.RenderToPage(Measurement parentClipBorder) +95 Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.RenderToPage(Measurement parentClipBorder) +509 Microsoft.ReportingServices.Rendering.ImageRenderer.Rectangle.RenderToPage(Measurement parentClipBorder) +174 Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.RenderToPage(Measurement parentClipBorder) +251 Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.ProcessPages(CompositionBase theComposition, Report theReport, Boolean needTotalPages, Int32 startPage, Int32 endPage, Boolean render) +455 Microsoft.ReportingServices.Rendering.ImageRenderer.PdfReport.RenderReport(Report report, NameValueCollection deviceInfo, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStreamCallback, Int32 streamPageNumber) +369 Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream) +43 [ReportRenderingException: An error occurred during rendering of the report.] Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream) +85 Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshot(IRenderingExtension renderer, CreateReportChunk createChunkCallback, RenderingContext rc, GetResource getResourceCallback) +1107 [WrapperReportRenderingException: An error occurred during rendering of the report.] Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshot(IRenderingExtension renderer, CreateReportChunk createChunkCallback, RenderingContext rc, GetResource getResourceCallback) +1660 Microsoft.Reporting.LocalService.RenderWithDataCache(PreviewItemContext itemContext, ParameterInfoCollection reportParameters, IEnumerable dataSources, DatasourceCredentialsCollection credentials, IRenderingExtension renderer, ReportProcessing repProc, CreateAndRegisterStream createStreamCallback, ReportRuntimeSetup runtimeSetup) +1086 Microsoft.Reporting.LocalService.Render(PreviewItemContext itemContext, Boolean allowInternalRenderers, ParameterInfoCollection reportParameters, IEnumerable dataSources, DatasourceCredentialsCollection credentials, CreateAndRegisterStream createStreamCallback, ReportRuntimeSetup runtimeSetup, ProcessingMessageList& warnings) +264 Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, CreateAndRegisterStream createStreamCallback, Warning[]& warnings) +197 [LocalProcessingException: An error occurred during local report processing.] Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, CreateAndRegisterStream createStreamCallback, Warning[]& warnings) +231 Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings) +129 Microsoft.Reporting.WebForms.LocalReport.Render(String format, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings) +28 Microsoft.Reporting.WebForms.LocalReportControlSource.RenderReport(String format, String deviceInfo, NameValueCollection additionalParams, String& mimeType, String& fileNameExtension) +50 Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +143 Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +152 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
Free Windows Admin Tool Kit Click here and download it now
October 30th, 2009 8:21pm

I have checked my SQL Server 2005 runs on SP3 9.00.4035.00. That's CU13? But I still received the same error message.
April 27th, 2010 5:50am

I resized the .PNG image files and the report displayed successfully! This error message returned because the size of my image files were too big ...
Free Windows Admin Tool Kit Click here and download it now
April 27th, 2010 6:48am

Most of the threads on this issue appear to relate to Reporting Services on SQL Server. But the same problem occurs with the standalone Report Viewer control 2008 (http://tinyurl.com/327zo76) when running in local mode. I've just come across it in my web app which is still on Report Viewer 2008. Is there a hotfix for this component? Thanks, Rob.
November 28th, 2010 4:00pm

Sorry, clicked on the wrong button there, meant to hit 'reply' not 'propose as answer'.... Anyway, I had the same problem in SSRS 2005 with a jpg image, and resolved it by reducing the bit depth of the image from 32 bit to 24 bit (in Photoshop it was CYMK, changed it to RGB).
Free Windows Admin Tool Kit Click here and download it now
December 10th, 2010 12:27am

I too resolved this by effectively processing the image. My web app does something like this: BEGIN User uploads picture IF width>400 pixels THEN Rescale the image with 400 pixels wide ENDIF Save as JPEG END In the cases where it failed in the report viewer, the image was <400 pixels and therefore didn't go through the rescale code. I assume therefore that the "Save as JPEG" didn't do much except write the bitmap back to file whereas the "Rescale" option does something to the image so the problem doesn't occur. I change the code to: BEGIN User uploads picture Scaling = 1 IF width>400 pixels THEN Calculate scaling to reduce to 400 pixels ENDIF Scale picture Save as JPEG END So the key difference here is that the image always goes through rescaling although with scaling factor of 1 which doesn't actually rescale. This must be enough to put the JPEG into more report friendly format. Bit of a workaround. Cheers, Rob.
December 10th, 2010 6:37am

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

Other recent topics Other recent topics