rdlc导出excel分页数据量超过65536报错怎么办?
Reporting Services in Local Mode
rdlc在设计时,如果要将DateTime类型的字段展示成x年y月z日,那么需要使用格式化字符串的函数,但是格式枚举会有问题,它总显示一个红色波浪线, 代表这个脚本有问题,可是实际上,在msdn中查询出来的任意格式枚举都不会有错误,显示效果是正常的,这个算是一个假警报。
rdlc在使用自带的导出功能时,当数据量超过65536时,它无法像水晶报表一样自动增加sheet,这个不知道是轻量级控件的设计局限还是微软忘记了做。
问题是,有办法解决么?有补丁也成啊.
http://wenda.tianya.cn/wenda/thread?tid=10cf3f307827eb1a
Rendering .rdlc to Excel in Firefox on Mac
Richar posted on Tuesday, August 05, 2008 4:20 PM
I'm rendering a localreport to Excel. Works fine in IE and Firefox on a PC, but Excel can't open it on the Mac. I found KB article 918529 at http://support.microsoft.com/kb/918529 that somewhat describes the problem for an SSRS 2005 server report, but I'm not using SSRS to render a server report, it's a .rdlc. The article said that the Microsoft.ReportingServices.ExcelRendering.dll is modified by the hotfix/sp2. I installed SP2 for SS, but I'm not sure how to proceed from here. I copied this dll on our server in the bin folder of our web application (the file wasn't part of our solution before), but users on a Mac still cannot view the report (Excel just hangs trying to open it). Any help would be greatly appreciated. Here is the export part of my code (Asp.Net 2.0): private void Export(LocalReport report, string format) { Warning[] warnings; string[] streamids; string mimeType; string encoding; string extension; string deviceInfo; string contentType; switch (format) { case "PDF": deviceInfo =
contentType = "application/pdf"; break; case "EXCEL": deviceInfo = contentType = "application/vnd.ms-excel"; break; default: deviceInfo = contentType = "application/pdf"; break; } byte[] bytes = report.Render(format, deviceInfo, out mimeType, out encoding, out extension, out streamids, out warnings); HttpContext.Current.Response.Clear(); HttpContext.Current.Response.ClearHeaders(); HttpContext.Current.Response.ContentType = contentType; if(format == "EXCEL") HttpContext.Current.Response.AddHeader("Content-disposition", "attachment; filename=MyReport.xls"); HttpContext.Current.Response.BinaryWrite(bytes); HttpContext.Current.Response.End(); }
http://www.eggheadcafe.com/software/aspnet/32822202/rendering-rdlc-to-excel.aspx
(Server/Remote Mode)
Select Do not timeout report execution in Report Execution Timeout settings in your system
Path is http://<Machine Name>/Reports/Pages/Settings.aspx
And you cant export more than 65K Rows in one report
It seems that your report is quite big as dimensions (37000 rows x 182 columns), and it should be mentioned here that not only the dimensions of the report are important, but also the complexity.
I found this post that talks about similar performance issues for Excel renderer:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3474787&SiteID=1
To avoid being timeout during rendering a report, I would suggest to do this:
- go to Report Manager and render the report
- select Properties - Execution and from the section Report Execution Timeout choose the option:
Do not timeout report execution
Go to your report, right click on the detail row, and select "Insert Group". In the "Grouping and Sorting Properties" dialog box, put this in for the expression: =Int((RowNumber(Nothing) - 1) / 65000)
The 65000 is how many records will be on each sheet when exported to Excel. Then, check the box, "Page break at end". Re-run and export your report to Excel, you will have a sheet for each 65000 records.
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· Blazor Hybrid适配到HarmonyOS系统
· Obsidian + DeepSeek:免费 AI 助力你的知识管理,让你的笔记飞起来!
· 解决跨域问题的这6种方案,真香!
· 一套基于 Material Design 规范实现的 Blazor 和 Razor 通用组件库
· 分享4款.NET开源、免费、实用的商城系统
2009-02-19 C语言程序设计 第二章 数据类型
2009-02-19 C语言程序设计 第一章 C语言简介
2009-02-19 C语言程序设计 概述
2009-02-19 C语言程序设计 使用库函数参考手册
2009-02-19 C语言程序设计 认识函数
2009-02-19 C语言程序设计 VC6调试程序(视频)
2009-02-19 C语言程序设计 C-Free4.1调试程序(视频)