[AR16]导出PDF报表时异常
本帖最后由 ly1331 于 2024-4-25 08:47 编辑"System.InvalidCastException: Unable to cast object of type 'GrapeCity.Enterprise.Data.DataEngine.DataTree`1+Scope[]' to type 'GrapeCity.Enterprise.Data.DataEngine.Collections.IReadOnlyList`1]'.\n at System.Text.Json.ThrowHelper.ThrowInvalidCastException_DeserializeUnableToAssignValue(Type typeOfValue, Type declaredType)\n at System.Text.Json.JsonSerializer.<UnboxOnRead>g__ThrowUnableToCastValue|50_0(Object value)\n at System.Text.Json.JsonSerializer.UnboxOnRead(Object value)\n at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)\n at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)\n at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsObject(Utf8JsonReader& reader, ReadStack& state)\n at System.Text.Json.JsonSerializer.ReadAsObject(Utf8JsonReader& reader, JsonTypeInfo jsonTypeInfo)\n at GrapeCity.ActiveReports.Core.Rendering.I.`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)\n at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)\n at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)\n at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)\n at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)\n at System.Text.Json.JsonSerializer.Read(Utf8JsonReader& reader, JsonTypeInfo`1 jsonTypeInfo)\n at GrapeCity.ActiveReports.Core.Rendering.I.`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)\n at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)\n at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)\n at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)\n at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)\n at System.Text.Json.JsonSerializer.Read(Utf8JsonReader& reader, JsonTypeInfo`1 jsonTypeInfo)\n at GrapeCity.ActiveReports.Core.Rendering.I.`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)\n at System.Text.Json.Serialization.JsonConverter`1.ReadAsObject(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)\n at System.Text.Json.Serialization.Converters.CastingConverter`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)\n at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)\n at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)\n at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsObject(Utf8JsonReader& reader, ReadStack& state)\n at System.Text.Json.JsonSerializer.ReadAsObject(Utf8JsonReader& reader, JsonTypeInfo jsonTypeInfo)\n at GrapeCity.ActiveReports.Core.Rendering.I.`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)\n at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)\n at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)\n at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)\n at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)\n at System.Text.Json.JsonSerializer.Read(Utf8JsonReader& reader, JsonTypeInfo`1 jsonTypeInfo)\n at GrapeCity.ActiveReports.Core.Rendering.I.`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)\n at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)\n at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)\n at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)\n at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)\n at System.Text.Json.JsonSerializer.Read(Utf8JsonReader& reader, JsonTypeInfo`1 jsonTypeInfo)\n at GrapeCity.ActiveReports.Core.Rendering.I.`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)\n at System.Text.Json.Serialization.JsonConverter`1.ReadAsObject(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)\n at System.Text.Json.Serialization.Converters.CastingConverter`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)\n at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)\n at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)\n at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsObject(Utf8JsonReader& reader, ReadStack& state)\n at System.Text.Json.JsonSerializer.ReadAsObject(Utf8JsonReader& reader, JsonTypeInfo jsonTypeInfo)\n at GrapeCity.ActiveReports.Core.Rendering.I.`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)\n at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)\n at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)\n at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)\n at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)\n at System.Text.Json.JsonSerializer.Read(Utf8JsonReader& reader, JsonTypeInfo`1 jsonTypeInfo)\n at GrapeCity.ActiveReports.Core.Rendering.I.`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)\n at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)\n at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)\n at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsObject(Utf8JsonReader& reader, ReadStack& state)\n at System.Text.Json.JsonSerializer.ReadAsObject(Utf8JsonReader& reader, JsonTypeInfo jsonTypeInfo)\n at GrapeCity.ActiveReports.Core.Rendering.I.`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)\n at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)\n at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)\n at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)\n at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)\n at System.Text.Json.JsonSerializer.Read(Utf8JsonReader& reader, JsonTypeInfo`1 jsonTypeInfo)\n at GrapeCity.ActiveReports.Core.Rendering.I.`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)\n at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)\n at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions
您好,方便上传一下您的报表文件我们看一下吗只有报错信息无法准确定位问题,感觉像是报表导出的时候报表中有数据渲染出问题了。 好的,我们先看一下 ly1331 发表于 2024-4-25 19:08
好的,我们先看一下
嗯嗯,您可以先看一下报表设计的时候,是不是有数据类型转换、特殊类型的数据。 您好,这种问题一般是因为报表设计的组件渲染异常导致的。您可以尝试删除组件排查具体是哪一个组件导致的,然后重点排查对应组件即可。
页:
[1]