p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional Crystal Reports for VS.NET (http://p2p.wrox.com/forumdisplay.php?f=45)
-   -   Disconnecting web report connection (http://p2p.wrox.com/showthread.php?t=40717)

aleahy April 3rd, 2006 12:03 PM

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?


All times are GMT -4. The time now is 05:27 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.