We are using the CrystalReportviewer on an ASP.NET page to render the
reports. The data binding is done by binding the ReportSource member
variable of the viewer to the InfoObject class instance, (after
casting to Report).
// infoobjects is the collection returned by querying the Business
crystalReportViewer.ReportSource = (Report)infoObjects;
According to the documentation, the viewer control itself is
responsible for opening the DB connection (based on the data sources
specified in the infoObject). Everything works fine. But the DB
connection opened by the viewer control is active even after closing
the client. (Actually the web page is accessed by a windows client via
the Internet Explorer ActiveX control). The number of connections
would increase every time we render a new report. The connections
never get released even after closing the client.
There is no way we can access the connection used by the viewer
control and close it explicitly, as the binding model doesn't support
it. What are we missing here?