Disconnecting web report connection
I'm using the CrystalReports Classes to view a report, somthing like this:
CrystalDecisions.CrystalReports.Engine.ReportDocum ent reportDocument1 = new ReportDocument();
CrystalDecisions.Web.CrystalReportViewer reportViewer = new CrystalDecisions.Web.CrystalReportViewer();
...
reportDocument1.Load("my.RPT");
reportViewer.ReportSource = reportDocument1;
//terminate
try
{
reportDocument1.DataSourceConnections.Clear();
reportDocument1.Database.Dispose();
reportDocument1.Dispose();
reportViewer.Dispose();
}
catch {}
The thing is, that each time I view a Report, it opens a connection to my database on my Unix machine but doesn't release it.
From the looks of things Crystal is maintaining the connection and isn't issuing a 'decisive' disconnect. Is there a configurable connection timeout or an explicit disconnect method I can code?
|