几次成功打印后,加载报告失败

时间:2019-02-06 14:40:34

标签: c# crystal-reports

从旧版本升级到Crystal Report版本13.0.x后(我忘记了哪一个),我收到“加载报告失败”错误(我猜这是由于新版CR中的打印作业限制引起的)引擎),我整天都在寻找任何解决方案,但是无论我尝试了什么,该问题都没有得到解决,如果有人遇到了同样的问题并找到了解决问题的方法,请帮帮我。

我已经尝试过此解决方案:

public static ReportDocument GetReportDoc(Type reportDoc)
    {
        if (reportQueue.Count > 30)
        {

            ((ReportDocument)reportQueue.Dequeue()).Dispose();

        }
        return CreateReportDoc(reportDoc);
    }

受保护的静态ReportDocument CreateReportDoc(类型reportClass)         {

        object report = Activator.CreateInstance(reportClass);
        reportQueue.Enqueue(report);
        return (ReportDocument)report;

    }

但是它不起作用

我还尝试在仍不工作的寄存器中设置PrintJobLimit = -1。

这是我致电报告的方式:

foreach(Row in selectedRows)

{

ReportDocument rptDocument = new ReportDocument();

rptDocument.Load(“ myReportDoc”); //和几次通话后,这是  加载报告失败异常发生

}

0 个答案:

没有答案
相关问题