Skip to Content
0
May 31, 2018 at 01:34 PM

CrystalReports ReportDocument in .net keeps database connections in sleeping mode in SQL

666 Views Last edit May 31, 2018 at 01:34 PM 2 rev

Hi,

I have a windows service written in C# which exports PDF reports. After successful execution of process, I see that there is last connection always left in database in sleeping mode. As i have hundreds of report, the sleeping connections keep on piling in database causing instability.

I use Crystal Reports for .NET Framework 4.0 version 13.0.2000.0 and Runtime version v2.0.50727

I get the sleeping connection for the last procedure in crystal report, when the following line runs

ReportDocument.Export(exportOptions);

Is it a known bug that crystal report leaves the last connection in database? I didn't found any forceful logoff method in C# to close the connection. Appreciate your help on this.

Thanks