reportdocument

What is the best way to cleanup the resources used by a Crystal Reports ReportDocument object?

喜欢而已 提交于 2019-12-06 19:14:03
问题 I am working on an application that uses Crystal Reports for the reporting. It opens a given report in a ReportDocument object, does what it needs to do and then closes the report. using (var report = OpenReport(reportSourceInfo)) { // Do stuff with the report report.Close(); } The OpenReport method does some validation of the source file and returns an open ReportDocument object. Testing has shown that this code does what it's meant to do and appears to have no issues. The problem I'm really

What is the best way to cleanup the resources used by a Crystal Reports ReportDocument object?

霸气de小男生 提交于 2019-12-05 00:52:58
I am working on an application that uses Crystal Reports for the reporting. It opens a given report in a ReportDocument object, does what it needs to do and then closes the report. using (var report = OpenReport(reportSourceInfo)) { // Do stuff with the report report.Close(); } The OpenReport method does some validation of the source file and returns an open ReportDocument object. Testing has shown that this code does what it's meant to do and appears to have no issues. The problem I'm really after advice on is when I do a code analysis (CA) build of the reporting project, I get the following