2009-06-16 59 views
1

我有一個RDLC與尼康Coolpix 5600拍攝的嵌入式圖像,當我調用渲染功能時會引發以下錯誤。LocalReport渲染器失敗,圖像來自Nikon Coolpix 5600

示例圖像: http://img140.imageshack.us/img140/4906/dscn1559u.jpg (死鏈接)

沒有別人知道什麼`錯形象?

的錯誤:

[ArgumentOutOfRangeException: Nicht negative Zahl erforderlich. 
Parametername: value] 
    System.IO.MemoryStream.set_Position(Int64 value) +7679482 
    Microsoft.ReportingServices.Rendering.ImageRenderer.CanvasPDF.MonochromeJpeg(MemoryStream memStream) +601 
    Microsoft.ReportingServices.Rendering.ImageRenderer.CanvasPDF.ProcessImage(CanvasImagePDF image, Double left, Double top, Double width, Double height, Boolean scaleImage) +1656 
    Microsoft.ReportingServices.Rendering.ImageRenderer.CanvasPDF.DrawImage(OutlineObjects outlines, CanvasImage image, Double left, Double top, Double width, Double height) +235 
    Microsoft.ReportingServices.Rendering.ImageRenderer.Image.RenderToPage(Measurement parentClipBorder) +1275 
    Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.RenderToPage(Measurement parentClipBorder) +485 
    Microsoft.ReportingServices.Rendering.ImageRenderer.Rectangle.RenderToPage(Measurement parentClipBorder) +373 
    Microsoft.ReportingServices.Rendering.ImageRenderer.RenderingItemContainer.RenderToPage(Measurement parentClipBorder) +246 
    Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.ProcessPages(CompositionBase theComposition, Report theReport, Boolean needTotalPages, Int32 startPage, Int32 endPage, Boolean render) +912 
    Microsoft.ReportingServices.Rendering.ImageRenderer.PdfReport.RenderReport(Report report, NameValueCollection deviceInfo, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStreamCallback, Int32 streamPageNumber) +652 
    Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream) +81 

[ReportRenderingException: Fehler beim Rendern des Berichts.] 
    Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream) +142 
    Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(IRenderingExtension renderer, DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc, CreateReportChunk cacheDataCallback, Boolean& dataCached) +1775 

[WrapperReportRenderingException: Fehler beim Rendern des Berichts.] 
    Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(IRenderingExtension renderer, DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc, CreateReportChunk cacheDataCallback, Boolean& dataCached) +2417 
    Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(IRenderingExtension renderer, DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc) +72 
    Microsoft.Reporting.LocalService.RenderWithDataCache(PreviewItemContext itemContext, ParameterInfoCollection reportParameters, IEnumerable dataSources, DatasourceCredentialsCollection credentials, IRenderingExtension renderer, ReportProcessing repProc, CreateAndRegisterStream createStreamCallback, ReportRuntimeSetup runtimeSetup) +2069 
    Microsoft.Reporting.LocalService.Render(PreviewItemContext itemContext, Boolean allowInternalRenderers, ParameterInfoCollection reportParameters, IEnumerable dataSources, DatasourceCredentialsCollection credentials, CreateAndRegisterStream createStreamCallback, ReportRuntimeSetup runtimeSetup, ProcessingMessageList& warnings) +441 
    Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, CreateAndRegisterStream createStreamCallback, Warning[]& warnings) +364 

[LocalProcessingException: Fehler bei der lokalen Berichtsverarbeitung.] 
    Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, CreateAndRegisterStream createStreamCallback, Warning[]& warnings) +418 
    Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings) +199 
    Microsoft.Reporting.WebForms.LocalReport.Render(String format, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings) +57 
    HrmSuite.MvcWebClient.EmployeePresentation.Render(Guid guid, String& mimeType, String reportMapPath, Boolean anonym) in C:\VS2008\HrmSuite\HrmSuite.MvcWebClient\Reports\EmployeePresentation.vb:226 
    HrmSuite.MvcWebClient.EmployeeController.RenderReport(Guid guid, Boolean anonym) in C:\VS2008\HrmSuite\HrmSuite.MvcWebClient\Controllers\EmployeeController.vb:152 
    lambda_method(ExecutionScope , ControllerBase , Object[]) +230 
    System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17 
    System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +178 
    System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +24 
    System.Web.Mvc.<>c__DisplayClassa.<InvokeActionMethodWithFilters>b__7() +52 
    System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +254 
    System.Web.Mvc.<>c__DisplayClassc.<InvokeActionMethodWithFilters>b__9() +19 
    System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +254 
    System.Web.Mvc.<>c__DisplayClassc.<InvokeActionMethodWithFilters>b__9() +19 
    System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +192 
    System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +399 
    System.Web.Mvc.Controller.ExecuteCore() +126 
    System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +27 
    System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +7 
    System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +151 
    System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) +57 
    System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) +7 
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75 

編輯

的EXIF數據似乎是原因仍然在調查:)

+1

橫向。 J/K。 – 2009-06-16 13:59:03

+0

它只是我的辦公室牆壁的演示拍攝:) – 2009-06-16 14:07:57

回答

1

我通過再編碼與System.Drawing.Bitmap 不是一個完美的解決方案的整體形象解決了這個問題,但它適用於現在。

1

的圖像需要在Base64編碼的爲了在SSRS中呈現。

這是一個VB.NET函數,它將執行編碼。你可能可以優化,我只是粘貼了我的舊功能。

Public Function ConvertImageToBase64String(ByVal img As Image) As String 
    Dim output As String = "" 
    Dim outputArray() As Byte 
    Dim stream As New MemoryStream 
    img.Save(stream, Drawing.Imaging.ImageFormat.Png) 
    outputArray = stream.ToArray() 
    stream.Close() 
    output = Convert.ToBase64String(outputArray) 
    Return output 
    End Function