水晶報表 - COMException (0x800003e5): 打開報表失敗

1 操作:點擊打印按鈕(打印GridView列表中的記錄)

2 錯誤信息:

================================================================================================
 
"/"應用程序中的服務器錯誤。
--------------------------------------------------------------------------------
打開報表失敗。 
說明: 執行當前 Web 請求期間,出現未處理的異常。請檢查堆棧跟蹤信息,以瞭解有關該錯誤以及代碼中導致錯誤的出處的詳細信息。 

異常詳細信息: System.Runtime.InteropServices.COMException:打開報表失敗。

源錯誤: 

執行當前 Web 請求期間生成了未處理的異常。可以使用下面的異常堆棧跟蹤信息確定有關異常原因和發生位置的信息。  

堆棧跟蹤: 


[COMException (0x800003e5): 打開報表失敗。]
   CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) +0
   CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open (Object& DocumentPath, Int32 Options) +77
   CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +218

[Exception: 加載報表失敗。]
   CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +273
   CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) +875 
   CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) +52
   Report.Web.Report_Ord_Tihuodan.Page_Load(Object sender, EventArgs e) in f:/application/web/erpreport/web/report_ord_tihuodan.aspx.cs:89 
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +750

==========================================================================================================

3 解決過程

3.1 修改註冊表

HKEY_LOCAL_MACHINE->SOFTWARE->Crystal Decisions->10.2->Report ApplicationServer->Server>PrintJobLimit爲-1或300,1000,測試次數最多可延長至148次
 
重啓IIS,測試網站,點擊次數爲235左右時又出錯了(PrintJobLimit設置爲-1,0,300,500結果一樣)
3.2 系統TEMP目錄賦予users操作的權限

3.3 使用BAT文件定時重啓IIS

清空C:/Documents and Settings/username/ASPNET/Local Settings/Temp/ 下tmp文件

不是長久之計。

3.4  關閉和釋放報表資源

private void Page_Unload(object sender, EventArgs e)
{
ReportDoc.Close();
ReportDoc.Dispose();
}

First, the problem is the AppPool, if you review the task manager you can see w3wp.exe with a high Mem Usage this is because you run many reports at the same time and keep alive for many time, this issue produce the error, because don't have more memory assigned to run more reports, the limit are 75. Review your settings in IIS Manager, indetify you application pool, in the Performace Options set "Shutdown worker proccess..." to 5 or something similar and "Limit the kernel request queue.." to 4000 or something similar. Open the report and see if w3wp.exe close or reduce Mem Usage in the time where you set.

4 總結

應急措施:重啓IIS

永久措施:關閉和釋放報表資源

5 參考文章

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

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=71929&SiteID=1

5.2 Use the Close() Method to free up the report

http://msdn.microsoft.com/en-us/library/ms225490(VS.80).aspx

5.3 開啓報表出錯

http://blog.csdn.net/daisylh/archive/2006/12/12/1439312.aspx

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章