我在打开报告时遇到错误:
The maximum report processing jobs limit configured by your system administrator has been reached
我搜索了互联网,几乎每个人都在建议解决方案:
ReportDocument.Close();
ReportDocument.Dispose();
我已经尝试过但是我几乎每天都在生产服务器上遇到同样的错误。我的代码如下:
ReportDocument rptDoc = new ReportDocument();
protected void Page_Load(object sender, EventArgs e)
{
ShowReport();
}
protected override void OnUnload(EventArgs e)
{
if (rptDoc != null)
{
rptDoc.Close();
rptDoc.Dispose();
}
base.OnUnload(e);
}
protected void ShowReport()
{
rptDoc.Load(Server.MapPath("~/Reports/RptFiles/rptPrint.rpt"));
//Rest of the code
}
有人可以指出我做错了吗?