2012-12-28 17 views
0

這開始時,我在我的項目中創建和使用報告(rdlc),現在每次我打開窗體報告它仍然工作正常錯誤將顯示時我關閉我的應用程序我該如何解決這個問題?在我的項目關閉程序後得到錯誤「CannotUnloadAppDomainException」在C#

enter image description here

+0

您是否在沙箱中運行您的報告?如果是的話,你是否發佈沙盒應用程序域? –

+0

@ sa_ddam213,你是什麼意思的沙箱?,這是一個Windows窗體應用程序項目:) – GrayFullBuster

回答

1
private void Form1_FormClosing(Object sender,System.Windows.Forms.FormClosingEventArgs e) 
{ 
     ReportViewer1.LocalReport.ReleaseSandboxAppDomain(); 
} 
+0

謝謝先生!它完美的工作! – GrayFullBuster

0

這也爲我工作。

reportviewer.Reset();

相關問題