View Single Post
  #1 (permalink)  
Old April 3rd, 2006, 12:03 PM
aleahy aleahy is offline
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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?