关闭rdlc报表打印预览后,关闭客户端,抛出异常“发生了应用程序级的异常 将退出”

问题:关闭rdlc报表打印预览后,关闭客户端,抛出异常“发生了应用程序级的异常 将退出”ide

 

办法:在容纳ReportViewer的窗体后台代码中,添加以下代码便可this

        protected override void OnFormClosed(FormClosedEventArgs e)
        {
            base.OnFormClosed(e);
            this.reportViewer1.LocalReport.ReleaseSandboxAppDomain();
        }
相关文章
相关标签/搜索