troubleshooting Question

How to release memory when the parameter dialog appears in Crystal Reports 2008

Avatar of tharstern
tharsternFlag for United Kingdom of Great Britain and Northern Ireland asked on
Crystal ReportsC#
6 Comments2 Solutions509 ViewsLast Modified:
We are using Crystal Reports 2008 SP5 in VS2008.

One of our users found that after running a lot of reports (50+) that the memory of our application had increased considerably.

To track the issue I created a simple app that displays a report from a path.  There is no database connection in the report.

Running the report once loads all the dll's into memory.
If the report doesn't include a parameter then after running the report a second time the memory returns to what is was.

Change the report to now include a parameter and running the app again.
The parameter select dialog will now appear each time the report is run.
Running the report once loads all the dll's into memory.
After running the report a second time all the memory isn't released. It increased by about 2,000KB

If we keep running the report that displays the parameter dialog the memory keeps increasing and is never released.

We use the ReportDocument.Close() and ReportDocument.Dispose() and GC.Collect(), which does release the memory if there are no parameters.

I also tried running the report directly within Crystal Reports 2008 with the same results.

Is there something else needed to be done to dispose of the memory when parameters are displayed?
Freelance programmer / Consultant

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros