on 03-29-2016 3:04 PM
Hi,
comparable to description of , I still do have the same problem.
The application runs as a windows service on Windows Server 2012.
I'm using Crystal Report v13.0.13 for .NET (x64 , Framework 4.5.2) with visual studio 2013.
Accourding to the "Fixed issues" at http://scn.sap.com/docs/DOC-7824 this problem has not been fixed in th newer releases.
The problem exits since we migrated the project from 32-bit to 64-bit and from VS 2008 to VS2013.
It is definitly Crystal R. that does not free the memory correctly.
Which further informations do you need to fix this bug?
Thanks in advance!
The thing to remember is that the Crystal and BO SDKs are based on COM objects, which can cause memory leaks if not handled correctly. So, when possible, you should either enclose calls to a report in the SDK with a "using" clause, or explicitly call .dispose() on the report when you're done with it.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your fast response. Unfortunately that's what I am already doing: .Dispose() on the Crystal R.-object and additionally on the DataSet and tables.
{ |
[...]
try | |
{ | |
[...] | |
crReportDocument = new ReportDocument(); | |
crReportDocument.Load(pathReport); | |
crReportDocument.SetDataSource(dsData); | |
crReportDocument.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Landscape; | |
crReportDocument.SetParameterValue("finalized", false); |
if (myDestination.Equals(DestinationChoice.toDisk)) | |
{ | |
crReportDocument.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, fileWithPath); | |
} | |
else if (myDestination.Equals(DestinationChoice.toHttpResponse)) | |
{ | |
crReportDocument.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, System.Web.HttpContext.Current.Response, true, filename); | |
} | |
} | |
catch (Exception ex) | |
{ | |
throw ex.ToString(); | |
} | |
finally | |
{ | |
if (crReportDocument != null) | |
{ | |
crReportDocument.Close(); | |
crReportDocument.Dispose(); | |
} | |
tabMaindata.Clear(); | |
tabMaindata.Dispose(); | |
tabSubrpdata.Clear(); | |
tabSubrpdata.Dispose(); | |
dsData.Clear(); //DataSet contains tabMaindata and tabSubrpdata | |
dsData.Dispose(); | |
} | |
} |
User | Count |
---|---|
82 | |
9 | |
9 | |
7 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.