本帖最后由 Crystal.Li 于 2021-7-28 09:55 编辑
报表中含有印章和签名图片,导出Excel报错,导出PDF正常,请问什么原因?
控制台报错:
Error: "Render target cannot be created on the current platform."
details: "System.Exception: Render target cannot be created on the current platform.\r\n at GrapeCity.Documents.Imaging.Windows.GcWicBitmap.EnsureRenderTargetCreated()\r\n at GrapeCity.Documents.Imaging.Windows.GcWicBitmapGraphics..ctor(GcWicBitmap A_0, Nullable`1 A_1)\r\n at GrapeCity.Documents.Imaging.Windows.GcWicBitmap.CreateGraphics(Nullable`1 backColor)\r\n at GrapeCity.ActiveReports.Core.Export.Image.Page.I..Create( info)\r\n at GrapeCity.ActiveReports.Core.Export.Image.Page.I..NewPage(Int32 pageNumber, SizeF sizeTwips)\r\n at GrapeCity.ActiveReports.Rendering.Export.ItemRenderer.Render(TargetDeviceKind target, Boolean doContent, Boolean doBackground, Boolean doBorders)\r\n at GrapeCity.ActiveReports.Core.Export.Image.Page.I..(ILayoutArea area, String mimeType, SizeF dpi, Boolean doContent, Boolean doBackground, Boolean doBorders)\r\n at GrapeCity.ActiveReports.Core.Export.Image.Page.I..Render(ILayoutArea area, String mimeType, SizeF dpi)\r\n at GrapeCity.ActiveReports.Core.Export.Excel.Page.I..( context, ILayoutArea area, IDictionary`2 innerBorderWidthInPixels)\r\n at GrapeCity.ActiveReports.Core.Export.Excel.Page.I..( context, renderingArea, ILayoutArea layoutArea)\r\n at GrapeCity.ActiveReports.Core.Export.Excel.Page.I..Render( context, ILayoutArea layoutArea)\r\n at GrapeCity.ActiveReports.Core.Export.Excel.Page.I...Accept( visitor)\r\n at GrapeCity.ActiveReports.Core.Export.Excel.Page.I...Accept( visitor)\r\n at GrapeCity.ActiveReports.Core.Export.Excel.Page.I...Accept( visitor)\r\n at GrapeCity.ActiveReports.Core.Export.Excel.Page.I...Accept( visitor)\r\n at GrapeCity.ActiveReports.Core.Export.Excel.Page.I...Accept( visitor)\r\n at GrapeCity.ActiveReports.Core.Export.Excel.Page.I..Traverse( traverser, ILayoutPage page)\r\n at GrapeCity.ActiveReports.Export.Excel.Page.ExcelExport.Export(IReport report, Stream stream, CancellationToken cancel, ExcelExportSettings settings)\r\n at GrapeCity.ActiveReports.Web.Viewer.I..Export(Object document, Stream originalStream, exportSettings, CancellationToken cancel)\r\n at GrapeCity.ActiveReports.Web.Viewer.I..Export(Object document, Stream stream, settings, CancellationToken cancel)\r\n at GrapeCity.ActiveReports.Web.Viewer.I...(Task`1 task)\r\n at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()\r\n at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)\r\n--- End of stack trace from previous location ---\r\n at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)"
message: "Render target cannot be created on the current platform."
|