Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report with a memory Leak

Status
Not open for further replies.

trScott

Technical User
Dec 13, 2004
31
0
0
US
I have a very large report (really a main report with about 30 subreports (and some of those have subreports)) - it is a tax return. I am dynamically setting the recordsources of almost all of the subreports using multiple "Me.RecordSource = xxxx" - per example:
If (abc for is loaded) then
me.recordsource='...'
else
me.recordsource='....'
end if

I have no problem printing 10, 20, or even a few hundred returns. The problem resides in that I must print up to a 1000 returns and it always seems to crash on about 500 returns (I can send them to the printer or print them using PDF and it does the same thing). As the printing is progressing, I look in task manager and can see the memory usage increasing (usually at around a 100m, but don't believe there is some magic number it crashes on).

I am trying to determine if there is someway to find the memory leak. Must I explicitly close each subreport before closing the main report? do I have to close the recordsource of each subreport when closing the main report? Is there some way to determine how many open objects are in the system?

Any and all help is greatly appreciated!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top