V16 缺少必须的元素。TableRow TableCells 是必须元素
错误明细: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的服务器上复制一个配置文件:C:\Program Files (x86)\GrapeCity\ActiveReports **\GrapeCity.ActiveReports.config
将配置文件复制到项目的根目录下。并修改一个配置;
<add key="SkipReportValidation" value="true"/>
修改start up中的代码-useReporting中添加如下:
app.UseReporting(config => {
config.UseConfig("./GrapeCity.ActiveReports.config");
}
);即可设置跳过代码校验
昀迅昊 发表于 2023-9-6 14:58
您好,目前看您的报错提示是表格的行和表格的列是必须元素,您检查一下您的报表设计。如果还是有问题,建议您上传具体的报表设计的截图,或者上传对应的报表文件,我们具体看看。 这个就是具体表单 昀迅昊 发表于 2023-9-6 16:20
这个就是具体表单
您好,下载并查看了您的报表文件,我这边修改数据源后测试报表是正常的,
发现您用的是运行时数据源,您检查一下对应的数据,是否是代码的数据没加载正确导致的。
运行时数据源参考链接:通过 DataSet 类型数据源绑定 DataTable - ActiveReports 报表控件用户手册 - 葡萄城产品文档中心 (grapecity.com.cn)
本帖最后由 昀迅昊 于 2023-9-6 20:16 编辑
数据源是有的
页:
[1]