zhaorong 发表于 2021-5-18 17:58:35

导出报表报错

分组报表可以显示,但是导出或者折叠某一个列的时候报错
System.Text.Json.JsonException: Expected depth to be zero at the end of the JSON payload. There is an open JSON object or array that should be closed. Path: $ | LineNumber: 0 | BytePositionInLine: 593264.
---> System.Text.Json.JsonReaderException: Expected depth to be zero at the end of the JSON payload. There is an open JSON object or array that should be closed. LineNumber: 0 | BytePositionInLine: 593264.
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
   at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
   at System.Text.Json.Utf8JsonReader.Read()
   at System.Text.Json.Utf8JsonReader.TrySkip()
   at System.Text.Json.JsonSerializer.ReadValueCore(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& state)
   --- End of inner exception stack trace ---
   at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
   at System.Text.Json.JsonSerializer.ReadValueCore(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& state)
   at System.Text.Json.JsonSerializer.Deserialize(Utf8JsonReader& reader, JsonSerializerOptions options)
   at GrapeCity.ActiveReports.Core.Rendering.I.\uE33D.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadCore(Utf8JsonReader& reader, Type returnType, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.Deserialize(String json, Type returnType, JsonSerializerOptions options)
   at GrapeCity.ActiveReports.Web.Viewer.I.\uE037`1.get_Item()
   at GrapeCity.ActiveReports.Web.Viewer.I.\uE02F.BuildReport(\uE02A rdlDocument, \uE013 exportSettings, IFontsFactory fonts)
   at GrapeCity.ActiveReports.Web.Viewer.I.\uE02F.Export(Object document, Stream originalStream, \uE013 exportSettings, CancellationToken cancel)
   at GrapeCity.ActiveReports.Web.Viewer.I.\uE025.Export(Object document, Stream stream, \uE013 settings, CancellationToken cancel)
   at GrapeCity.ActiveReports.Web.Viewer.I.\uE00B.\uE007.\uE000(Task`1 task)
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)

James.Lv 发表于 2021-5-18 18:45:46

本帖最后由 James.Lv 于 2021-5-18 18:46 编辑

您好,我这边用15.1.2的WebDesigner_MVC打开报表,预览导出都是正常的,您可以尝试一下使用这个工程验证一下您的报表




zhaorong 发表于 2021-5-21 14:51:29

我把后端组件包升级到了15.1.2还是存在这个问题,首次可以导出Excel,再次导出的时候就报错了。

Crystal.Li 发表于 2021-5-21 18:04:56

我们这边点多次导出没有出现问题,您看您可以给我们一个demo工程吗,我们可以看看

zhaorong 发表于 2021-5-22 12:04:20

Report.Client 是基于Vue的前端,运行前要还原npm包

Crystal.Li 发表于 2021-5-24 17:48:11

zhaorong 发表于 2021-5-22 12:04
Report.Client 是基于Vue的前端,运行前要还原npm包

我们这边验证出结果给您回复~

zhaorong 发表于 2021-5-25 10:27:33

有进账尽快反馈,用户在等着处理方案。

Crystal.Li 发表于 2021-5-25 15:43:33

我们看了下,只有这一个报表会出现这个问题,这个报表的设计也比较复杂,用了非常多的分组功能。
我们先向开发团队反馈求助一下,得到反馈方案给您回复。

zhaorong 发表于 2021-5-28 14:36:48

有距表的报表渲染性能很差,甚至经常会卡死。

James.Lv 发表于 2021-5-28 16:46:50

zhaorong 发表于 2021-5-28 14:36
有距表的报表渲染性能很差,甚至经常会卡死。

您好,报表的渲染机制是预览报表时加载数据集数据,然后根据报表设计的进行渲染HTML,最后根据展示方式来进行展示
影响矩表渲染性能的两个主要因素,一、矩表设计的很宽,然后预览报表时,使用画廊模式,这样会导致报表把数据加载过来之后,需要把所有的数据和表格全部渲染完成后,才会在页面进行展示。
二、矩表使用的数据集数据量特别大,矩表本身带有行列分组聚合统计计算,如果您数据都是明细数据,那么在使用矩表时,会把所有数据加载过来,根据矩表设计进行分组聚合计算,这样会比较消耗客户端浏览器资源,会比较慢

针对这两种问题的解决方案,
一、将预览方式设置为分页模式,这样渲染出第一页报表就会先展示出来,后面的继续渲染,对用户体验会好很多
二、对明细数据先利用sql进行一次分组聚合,然后再把数据绑定到矩表上
页: [1] 2
查看完整版本: 导出报表报错