最近由于水晶报表使用频繁,出现了一些问题,归纳为以下几点
问题1:已达到系统管理员配置的最大报表处理作业数限制(我采用方案1,方案2没试过)
方案1:修改注册表,增加以下两个键的值
[HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\10.2\Report Application Server\InProcServer]
[HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\10.2\Report Application Server\Server]
修改 PrintJobLimit=1000
方案2:把以上键值改为-1
问题2.不支持的操作,无法在C++堆栈中打开JRC引擎处理文档
方案:网上说用以下方法可以解决,目前正在测试中
问题3:引发"System.OutOfMemoryException"的异常
方案:
1>.网上说是内存不够,需增加内存,没有测试过。
2>及时释放资源
myReport = new ReportDocument();
string fileName = Server.MapPath("~/Reports/IQCQuery/CryIQCReport.rpt");
myReport.Load(fileName);
//为新的报表文档设置数据源
myReport.SetDataSource(dsIQCPrint);
//将创建的新的报表文档绑定
this.CrystalReportViewer1.ReportSource = myReport;
this.CrystalReportViewer1.DataBind();
//释放资源
dsIQCPrint.Dispose();
//在Page_UnLoad中释放资源
protected void Page_UnLoad(object sender, EventArgs e)
{
//建立完页面时,释放报表文档资源
myReport.Close();
this.Dispose();
this.ClearChildState();
}
4. 附上相应错误页面