报表查看器在导出到 excel 时抛出内存不足异常错误 [英] Report viewer throws out of memory exception error while exporting to excel

查看:54
本文介绍了报表查看器在导出到 excel 时抛出内存不足异常错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

抛出内存不足异常 - 我试图将大记录从报表查看器导出到 Windows 窗体中的 excel 中.我已经为分页符应用了分组,因为 excel 不允许超过 65535 行.下面的表达式用于 Group On 表达式,

Out of memory exception thrown - I tried to export a large record from report viewer into excel in windows forms. I have applied grouping for page breaks since excel does not allow above 65535 rows. Below expression is used for Group On expression,

=Int((RowNumber(Nothing))/10000)

Page Break at end Checkbox is enabled for this grouping

通过单击报表查看器控件中可用的默认导出选项进行导出.但导致抛出内存不足异常.

while exporting by clicking on the default export option available in report viewer control. But results in out of memory exception thrown.

我做得对吗?是否有任何解决方案或解决方法?

Am i doing right? is there any solution or work around for this?

提前致谢,

推荐答案

上网多看,发现 32 位 (x86) 应用程序最多只使用 1.8 GB 内存,每个应用程序将共享.生成报告时超出内存限制导致内存不足异常.

After more surfing on the net, found that 32 bit(x86) application uses only maximum of 1.8 GB of memory will be shared for each application. while generating report it crosses the memory limit and leads to out of memory exception.

尝试在 x64 中运行该应用程序并生成报告,没有任何异常.

Tried to run the application in x64 and report is generated without any exceptions.

这篇关于报表查看器在导出到 excel 时抛出内存不足异常错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆