lundi 3 mars 2014

what is the proper way to free up memory from crystal report


Vote count:

0




i just want know what is the proper way to release memory that was occupied by crystal report.


this is my code :



ReportDocument reportdocument = new ReportDocument();
try
{
reportdocument.Load(Server.MapPath(@"~/EndUser/PostHistoryReport.rpt"));
reportdocument.SetDataSource(myDataSet);
reportdocument.SetDatabaseLogon("user", "user123");
CrystalReportViewer1.ReportSource = reportdocument;
}
finally
{
if (reportdocument != null)
{
reportdocument.Close();
((IDisposable)reportdocument).Dispose();
GC.Collect();
}
}


asked 34 secs ago

shal

46





Aucun commentaire:

Enregistrer un commentaire