找回密码
 立即注册

QQ登录

只需一步,快速开始

昀迅昊

注册会员

17

主题

58

帖子

167

积分

注册会员

积分
167
昀迅昊
注册会员   /  发表于:2023-9-6 14:56  /   查看:1367  /  回复:6
1金币
错误明细:
GrapeCity.ActiveReports.ReportException: 缺少必须的元素。TableRow TableCells 是必须元素。 ---> GrapeCity.ActiveReports.Rdl.Validation.ValidationReportException: Required element missing. The TableRow TableCells is a required element.
   在 GrapeCity.ActiveReports.PageReportModel.Validator.CheckForErrors(Int32 position)
   在 GrapeCity.ActiveReports.PageReportModel.Validator.ValidateItem(IValidateable item)
   在 GrapeCity.ActiveReports.PageReportModel.Validator.ProcessComponents(IReportComponentContainer container)
   在 GrapeCity.ActiveReports.PageReportModel.Validator.ProcessComponents(IReportComponentContainer container)
   在 GrapeCity.ActiveReports.PageReportModel.Validator.ProcessComponents(IReportComponentContainer container)
   在 GrapeCity.ActiveReports.PageReportModel.Validator.Validate(Report report)
   在 GrapeCity.ActiveReports.Rendering.ReportProcessor.ProcessReport(Boolean skipValidation, CancellationToken cancel, ActionKey[] interactiveActions)
   在 GrapeCity.ActiveReports.Rendering.ReportProcessor.Process(Boolean forceDataRefresh, Boolean forceParameterDataRefresh, CancellationToken token, Boolean skipValidation, ActionKey[] interactiveActions)
   在 GrapeCity.ActiveReports.Document.PageDocument.GetRenderableReport(Boolean forceDataRefresh, Boolean forceParameterDataRefresh, CancellationToken token)
   --- 内部异常堆栈跟踪的结尾 ---
   在 GrapeCity.ActiveReports.Document.PageDocument.GetRenderableReport(Boolean forceDataRefresh, Boolean forceParameterDataRefresh, CancellationToken token)
   在 GrapeCity.ActiveReports.Document.PageDocument.Render(IRenderingExtension renderingExtension, StreamProvider streams, NameValueCollection settings, Boolean forceDataRefresh, Boolean forceParameterDataRefresh, CancellationToken token, IProgress`1 progress)
   在 GrapeCity.ActiveReports.Viewer.Common.Internal.RdlReport..<LoadImpl>b__7()
   在 System.Threading.Tasks.Task.InnerInvoke()
   在 System.Threading.Tasks.Task.Execute()

附件: 您需要 登录 才可以下载或查看,没有帐号?立即注册

最佳答案

查看完整内容

您这种情况一般是因为存在一行,被完全合并。 就比如如下 看您的报表,应该是中间那个表头行导致的: 可以看到,这一行其实存在和不存在都不影响表格的显示,也就是这一行的所有单元格,都被其他行合并了会有这个情况。 解决方法三种: 1.删除不必要的一行。 2.将中间某个单元格拆分,让这一行可以正常显示 3.代码控制,这个是因为16之后对报表设计有了一个设计校验导致的,只要关闭预览校验即可: 先从安装AR的服务器上 ...

6 个回复

倒序浏览
最佳答案
最佳答案
Felix.LiWyn认证
超级版主   /  发表于:2023-9-6 14:56:30
来自 7#
您这种情况一般是因为存在一行,被完全合并。
就比如如下

看您的报表,应该是中间那个表头行导致的:

可以看到,这一行其实存在和不存在都不影响表格的显示,也就是这一行的所有单元格,都被其他行合并了会有这个情况。
解决方法三种:
1.删除不必要的一行。
2.将中间某个单元格拆分,让这一行可以正常显示
3.代码控制,这个是因为16之后对报表设计有了一个设计校验导致的,只要关闭预览校验即可:
先从安装AR的服务器上复制一个配置文件:C:\Program Files (x86)\GrapeCity\ActiveReports **\GrapeCity.ActiveReports.config
将配置文件复制到项目的根目录下。并修改一个配置;
  1. <add key="SkipReportValidation" value="true"/>
复制代码

修改start up中的代码-useReporting中添加如下:
  1. app.UseReporting(config => {
  2.   config.UseConfig("./GrapeCity.ActiveReports.config");
  3. }
  4. );
复制代码
即可设置跳过代码校验

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
昀迅昊
注册会员   /  发表于:2023-9-6 14:58:08
2#

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
Bella.YuanWyn认证
超级版主   /  发表于:2023-9-6 16:06:19
3#

您好,目前看您的报错提示是表格的行和表格的列是必须元素,您检查一下您的报表设计。如果还是有问题,建议您上传具体的报表设计的截图,或者上传对应的报表文件,我们具体看看。
回复 使用道具 举报
昀迅昊
注册会员   /  发表于:2023-9-6 16:20:07
4#
这个就是具体表单

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
Bella.YuanWyn认证
超级版主   /  发表于:2023-9-6 17:32:30
5#
昀迅昊 发表于 2023-9-6 16:20
这个就是具体表单

您好,下载并查看了您的报表文件,我这边修改数据源后测试报表是正常的,

发现您用的是运行时数据源,您检查一下对应的数据,是否是代码的数据没加载正确导致的。
运行时数据源参考链接:通过 DataSet 类型数据源绑定 DataTable - ActiveReports 报表控件用户手册 - 葡萄城产品文档中心 (grapecity.com.cn)




本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
昀迅昊
注册会员   /  发表于:2023-9-6 19:10:24
6#
本帖最后由 昀迅昊 于 2023-9-6 20:16 编辑


数据源是有的

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部