本文介绍了Crystal Reportview对象未正确处置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 Crystal Report查看器对象未正确处置 大家好我有一个问题我有一个水晶报告并使用vb.net。 我写的代码如下所示 对于 i = 0 15 尝试 Dim vRep 作为 新 CrystalDecisions.CrystalReports.Engine.ReportDocument vrep.export() Catch 最后 vrep .close() vrep.dispose() end 试用 NEXT vre时出现问题p.export引发异常然后在下一个循环步骤中我希望能够处理vrep.close() 和vrep.dispose()解决方案 不要那么说。将那些(昏暗,关闭,处置)放在循环之外(导出也应该在外面但不确定)。解决了。 并查看此提示/技巧 Crystal Reports:修复加载报告失败错误。 [ ^ ] Crystal Report viewer Object Not Disposing properly Hello guys i have one problem i have one crystal report and using vb.net.I write code where as belowFor i=0 to 15 Try Dim vRep As New CrystalDecisions.CrystalReports.Engine.ReportDocument vrep.export()CatchFinally vrep.close() vrep.dispose()end tryNEXTProblem occurs when vrep.export raise exception then in next loop step i want be able to dispose vrep.close()and vrep.dispose() 解决方案 Don't put that way. Put those(Dim, close, dispose) outside of loop(export also should be outside but not sure). Solved. And check this Tip/TrickCrystal Reports: Fix for "Load report failed" error.[^] 这篇关于Crystal Reportview对象未正确处置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-25 04:24