asp.net-core - RDLC - 在 AspDotNet Core 项目中使用 RDLC - 本地报告处理期间发生错误。指数数组的边界之外
问题描述
如何修复:在 AspNet Core 项目中使用 RLDC 和 AspNetCore.ReportingServices 会引发异常,因为 “本地报告处理期间发生错误。索引超出了数组的范围。”
- 我有 .Net Winforms 项目来添加 RDLC 文件。我总是在 AspNet Core 项目中复制/粘贴 rdlc 文件 + 数据源。
- 尝试导出 pdf/excel 并引发上述异常。
注:随机。它有时会来。但通常在 IIS 服务器上部署时。任何建议/建议或帮助将不胜感激。
异常:异常出现在我们的 DontNetCore 项目中包含的 AspNetCore.ReportingServices nuget 包中。这是堆栈跟踪。
“在 AspNetCore.Reporting.InternalLocalReport.InternalRender(字符串格式,布尔 allowInternalRenderers,字符串 deviceInfo,PageCountMode 的 AspNetCore.Reporting.InternalLocalReport.InternalRender(字符串格式,布尔值 allowInternalRenderers,字符串 deviceInfo,PageCountMode pageCountMode,CreateAndRegisterStream createStreamCallback,警告 []& 警告)处)在 AspNetCore.Reporting.InternalLocalReport.Render(字符串格式,字符串 deviceInfo,PageCountMode pageCountMode,字符串和 mimeType,字符串和编码,字符串和文件名扩展, AspNetCore.Reporting.LocalReport.Execute(RenderType renderType, Int32 pageIndex, Dictionary 上的 String[]& 流、警告[]& 警告)2 parameters, String findString) at Tracs4Life.Service.ReportService.<GenerateReportAsync>d__21.MoveNext() in C:\D drive\MySpace\CompanyProjects\BsiTracks4Life\Source\Tracs4Life\Tracs4Life.Service\ReportService.cs:line 572 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult() 在 Tracs4Life.Website.Controllers.ReportController.d__11.MoveNext() 在 C:\D drive\MySpace\CompanyProjects\BsiTracks4Life\Source\Tracs4Life\Tracs4Life.Website\Controllers\ReportController.cs:line 211"。
解决方案
不要使用任何表达式,报告将失败。这是这个库的限制
推荐阅读
- android - object not locked by thread before notify() in Foreground Service Notification
- mysql - 优化查询以使用内部连接在 MySQL 中查找 avg
- c++ - RapidJSON:用汉字写字符串
- vbscript - IE 文档中的 VBScript 错误 80004005 检查类
- mysql - 指定 FK 时,表中不存在 MYSQL Err #1072
- javascript - MySql - not connecting in nodejs
- node.js - 如何查看 ES 6 导入库的完整搜索路径
- android - 当我尝试在布局中添加图像时,应用程序在棒棒糖中运行良好,但在棉花糖中崩溃
- r - How to generate new id by comparing two data frames
- python - pyTelegramBotAPI search in text of the message with if/elif/else construction