We have a dynamically created report that we build using a table. One of the columns on this report is a PictureBox that we use a LoadImage(path) function for the value. This report displays correctly in the viewer. I can also export it to a PDF without a problem. However, when I try to export it to excel or when I try to write it directly to excel, I get a "parameter is not valid" error with the full stack trace shown below. I tried this locally and on a test server but I get the same error. Is there a setting on the PictureBox that I am missing? Configuration settings? Any ideas?
Exception type: ArgumentException
Exception message: Parameter is not valid.
Stack trace: at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
at Telerik.Reporting.ExcelRendering.PictureBox.GetAdjustedImage(Image originalImage, RectangleU srcRectangle, RectangleU dstRectangle)
at Telerik.Reporting.ExcelRendering.PictureBox.ProcessImage(Image originalImage, RectangleU& excelRectangle, Image& excelImage)
at Telerik.Reporting.ExcelRendering.PictureBox.RenderInternal(IWorksheet worksheet, RenderingContext context)
at Telerik.Reporting.ExcelRendering.RenderingItem.Render(IWorksheet worksheet, RenderingContext context)
at Telerik.Reporting.ExcelRendering.RenderingItemContainer.RenderInternal(IWorksheet worksheet, RenderingContext context)
at Telerik.Reporting.ExcelRendering.Table.RenderInternal(IWorksheet worksheet, RenderingContext context)
at Telerik.Reporting.ExcelRendering.RenderingItem.Render(IWorksheet worksheet, RenderingContext context)
at Telerik.Reporting.ExcelRendering.RenderingItemContainer.RenderInternal(IWorksheet worksheet, RenderingContext context)
at Telerik.Reporting.ExcelRendering.Section.RenderInternal(IWorksheet worksheet, RenderingContext context)
at Telerik.Reporting.ExcelRendering.RenderingItem.Render(IWorksheet worksheet, RenderingContext context)
at Telerik.Reporting.ExcelRendering.Group.RenderInternal(IWorksheet worksheet, RenderingContext context)
at Telerik.Reporting.ExcelRendering.RenderingItem.Render(IWorksheet worksheet, RenderingContext context)
at Telerik.Reporting.ExcelRendering.RenderingItemContainer.RenderInternal(IWorksheet worksheet, RenderingContext context)
at Telerik.Reporting.ExcelRendering.Report.RenderInternal(IWorksheet worksheet, RenderingContext context)
at Telerik.Reporting.ExcelRendering.RenderingItem.Render(IWorksheet worksheet, RenderingContext context)
at Telerik.Reporting.ExcelRendering.Report.Render(IWorkbook workbook)
at Telerik.Reporting.OpenXmlRendering.Spreadsheet.SpreadsheetReport.Telerik.Reporting.Processing.IRenderingExtension.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback)
at Telerik.Reporting.Processing.ReportProcessor.RenderCore(ExtensionInfo extensionInfo, IList`1 reports, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback)
at Telerik.Reporting.Processing.ReportProcessor.RenderCore(String format, IList`1 reports, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback)
at Telerik.ReportViewer.WebForms.ReportExportOperation.RenderReport(String format, IList`1 processingReports, Hashtable deviceInfo, IRenderingContext renderingContext)
at Telerik.ReportViewer.WebForms.ReportRenderOperation.PerformOperationOverride()
at Telerik.ReportViewer.WebForms.HandlerOperation.PerformOperation(HttpContext context, ICacheManager cacheManager)
at Telerik.ReportViewer.WebForms.BasicHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)