5

Crystal Report を使用していますが、次のエラーが表示されます。

The maximum report processing jobs limit configured by your system administrator has been reached

stackoverflow を検索したところ、2 つのトピックが見つかりました。

  1. Crystal Reports エラー: 最大レポート処理ジョブの制限
  2. Crystal Reports 例外: システム管理者によって設定されたレポート処理ジョブの最大制限に達しました

しかし、トピック 1 のように PrintJobLimit =-1 を変更すると、エラーは引き続き発生します。

トピック 2 の場合、レポートでページ間を移動する必要があるため、まだテストしていません。ナビゲートするには、レポートをセッションに保存する必要があります:

    ReportDocument reportDocument = null;
    protected override void OnInit(EventArgs e)
    {
        if (IsPostBack && Session["reportDocument"] != null)
        {
            reportDocument = (ReportDocument)Session["reportDocument"];
            crvReport.ReportSource = reportDocument;
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        reportDocument = new ReportDocument();
        Session["reportDocument"] = reportDocument;
        crvReport.ReportSource = reportDocument;

        reportDocument.Load(Server.MapPath("~/files/Users.rpt"));
        reportDocument.SetDatabaseLogon("******", "******", "*.*.*.*", "*****");
        reportDocument.VerifyDatabase();

        crvReport.DataBind();
    }

したがって、Session["reportDocument"] が null に変更されるため、アンロードで reportDocument を破棄できません

    protected void crvReport_Unload(object sender, EventArgs e)
    {
        if (reportDocument != null)
        {
            reportDocument.Close();
            reportDocument.Dispose();
            reportDocument = null;
            GC.Collect();
        }
    }

では、レポートのページ間を移動するにはどうすればよいですか? エラーが表示されません。

どうもありがとうございました

4

4 に答える 4

2

このリンクPdf ファイルを見つけました

したがって、crvReport_Unload でドキュメントを閉じて破棄するのではなく、別のページにリダイレクトするときにドキュメントを閉じて破棄します。

//OnRedirect
ReportDocument reportDocument = (ReportDocument)Session["reportDocument"];
reportDocument.Close();
reportDocument.Dispose();
reportDocument = null;
GC.Collect();

エラーはまだ発生しますが、それほど問題はありません。

于 2012-09-04T03:01:57.567 に答える
1

Crystal レポート バージョン 11.5 で同じ問題に直面していました。多くの検索の後、「HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Report Application Server\InprocServer」のようなさまざまなソリューションを見つけました。これは、印刷ジョブの制限などを増やすと言っていますが、どれもうまくいきませんでした。私reportDocument with cloneの場合、印刷/生成レポートの後にこれを行いました

reportDocument.Close(); 
reportDocument.Clone(); 
reportDocument.Dispose(); 
reportDocument = null;
GC.Collect();
GC.WaitForPendingFinalizers();

これがあなたを助けることを願っています。:)

于 2015-07-30T05:39:34.207 に答える
0

恒久的な解決策はありません。レジストリとコードを変更した後、数時間以内に問題が発生します。RDL または RDLC の変更を提案する

于 2014-02-17T10:08:33.713 に答える
0

朝、ここから何か試しましたか: http://social.msdn.microsoft.com/forums/en/vscrystalreports/thread/208525b2-94cd-4af6-9c5a-015e243b3092/

于 2012-08-24T11:23:14.080 に答える