ReportDocument Close is a method used in csharp to close the ReportDocument object. This method is used to release any resources consumed by the ReportDocument object and to remove it from memory. The ReportDocument class belongs to the CrystalDecisions.CrystalReports.Engine library.
Code examples:
Example 1: Close a ReportDocument object
ReportDocument report = new ReportDocument(); report.Load("Report1.rpt"); // do some operations on the report report.Close(); // close the report and release resources
Example 2: Ensure ReportDocument object is closed when application is closed
public class Form1 : Form { private ReportDocument report;
public Form1() { InitializeComponent();
report = new ReportDocument(); report.Load("Report1.rpt"); // do some operations on the report }
protected override void OnFormClosing(FormClosingEventArgs e) { base.OnFormClosing(e); report.Close(); // ensure report is closed when application is closed } }
In both of the above examples, the ReportDocument object is closed using the Close method to release any resources consumed by the object. The package library is CrystalDecisions.CrystalReports.Engine.
C# (CSharp) ReportDocument.Close - 60 examples found. These are the top rated real world C# (CSharp) examples of ReportDocument.Close extracted from open source projects. You can rate examples to help us improve the quality of examples.