2014-03-01 73 views
0

我正在使用水晶報表。隨着水晶報告,我做了很少沒有。的歷史記錄。現在只是要加載1139條記錄顯示,我得到這個錯誤像上面:如何使用水晶報表加載最大記錄?

Server Error in '/EasyWeb' Application. 
The maximum report processing jobs limit configured by your system administrator has been reached. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Runtime.InteropServices.COMException: The maximum report processing jobs limit configured by your system administrator has been reached. 

Source Error: 


Line 807:     dt.Rows.Add(dr); 
Line 808:     ReportDocument reportdocument = new ReportDocument(); 
Line 809:     reportdocument.Load(Server.MapPath(@"~/Admin/UserReport.rpt")); 
Line 810:     reportdocument.SetDataSource(myDataSet); 
Line 811:     reportdocument.SetDatabaseLogon("user", "user123"); 


Source File: f:\EasyWeb\Admin\User_Management.aspx.cs Line: 809 

Stack Trace: 


[COMException (0x80041016): The maximum report processing jobs limit configured by your system administrator has been reached.] 
    CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) +0 
    CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) +144 
    CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +526 

[CrystalReportsException: Load report failed.] 
    CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +621 
    CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) +1969 
    CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) +186 
    Admin_User_Management.lbut_print_Click(Object sender, EventArgs e) in f:\EasyWeb\Admin\User_Management.aspx.cs:809 
    System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +111 
    System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +79 
    System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175 
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565 


Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053 

----------------------- - - - - - - - 更新 - - - - - - - - - - - - - - - - - - ------------

reportdocument.Load(Server.MapPath(@"~/Admin/PostHistoryReport.rpt")); 
      reportdocument.SetDataSource(myDataSet); 
      reportdocument.SetDatabaseLogon("user", "user123"); 
      CrystalReportViewer1.ReportSource = reportdocument; 
      reportdocument.Clone(); 
      reportdocument.Dispose(); 
      GC.Collect(); 

,但它讓我在加載時的錯誤,我包括它的屏幕截圖總結。

enter image description here

+0

你在哪裏看到此錯誤下一個例子

Protected Sub CrystalReportViewer1_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Unload master1.Close() master1.Dispose() GC.Collect() End Sub 

?在CR或通過在一些像BO CMC – Siva

回答

0

我們最近面臨類似的問題,它沒有任何關係的報告試圖檢索的記錄數,而是數乘以你使用了水晶報表運行時打開和訪問報告,特別是創建和使用ReportDocument變量,而不關閉和處理它。

看一看的相關文章:
Crystal Reports Exception: The maximum report processing jobs limit configured by your system administrator has been reached

實際上,我們的解決方案是以下模式:

ReportDocument report = CreateReportDocument(reportPath); 

// Do stuff with the report 

report.Close(); 
report.Dispose(); 
GC.Collect(); 

這解決了我們的能夠產生少數問題在獲得相同的例外之前,您已經有過報告。我希望這有幫助!

+0

這樣的服務器上載CR,我使用了ur技術,但它在運行時不起作用。看到我更新的問題。 –

+0

你鏈接的那篇文章對我有同樣的問題。沒有找到對象引用.... –

+0

對不起,但「對象引用未找到」是從哪裏來的?我不明白你是如何鏈接到你遇到的問題......? – Fooksie

0

首先在cmd提示符上發出ISSRESET命令以清除日誌,並將下面的代碼放在報表查看器的Unload事件下。

這裏是