Large database generates out-of-memory message.
I am using RB 5.5 and Delphi 5 on w2k.
I have created a report that works fine on small and medium sized
databases, but when I try to run it on our cliens actual data (~200000
records) I get an error message saying it could not generate report
because it ran out of memory.
This happens a while after the Print method is called, and it does not
matter whether the output device is printer, file, or screen.
CachePages is false.
Is there anything I can do to get by this problem?
Thanks.
I have created a report that works fine on small and medium sized
databases, but when I try to run it on our cliens actual data (~200000
records) I get an error message saying it could not generate report
because it ran out of memory.
This happens a while after the Print method is called, and it does not
matter whether the output device is printer, file, or screen.
CachePages is false.
Is there anything I can do to get by this problem?
Thanks.
This discussion has been closed.
Comments
TppCacheManager.CachePath
Run-time only. You should rarely, if ever, need to set this property.
When
a report is very long (over 1,000 pages), the report engine may switch
to
disk-based caching if it runs out of memory. In the event that this
occurs,
the value of this property indicates the directory to which the
temporary
caching files will be written.
Defaults to the current windows path for temporary files.
TppCacheManager.CacheType
Run-time only. You should rarely, if ever, need to set this property.
When
a report is very long (over 1,000 pages), the report engine may switch
to
disk-based caching if it runs out of memory. In the event that this
occurs,
the value of this property indicates whether the caching has changed.
Also,
if for some reason you would like to force file caching, you can set
this
property to ppCTFile. The temporary caching files will be written to
the
directory specified in the CachePath property.
Value Meaning
----------------------------
ppCTFile Report engine caches to disk files.
ppCTMemory Report engine caches to memory
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
CacheType only has any effect if you actually Cache the pages, correct?
However this "out of memory" error happens when the report is actually
created. When I'm for example printing it to the screen I will see the
first page, and at the bottom I see a counter saying "calculating report
page XXX" it goes to around 2000 pages and then I get the out of memory
message. Same thing happens when I try to print directly to a printer.
Looking in the task manager it seems like each new page it loads takes
up about 25k of new memory, so you can see that with a large report it
will create problems quite fast.
I also saw a message posted around the same time with my original post
that had the out of memory error with rb version 6 so I see there is no
use in trying to upgrade.
Now, is this limitation a known problem or are these isolated occurances
(i.e. can you reliably create reports with several thousands of pages).
If it is a known proble, is a solutuion on the way, otherwise I guess
it's back to, shudder, crystal (
pages have been generated, then they are sent together as one print job.
During generation, if the memory limit is reached, RB is supposed to write
the pages to hard disk automatically. We'll have to retest this with some
large reports.
You are seeing the 'Calculating page: xxxx' because your Report.PassSetting
is set to psTwoPass, and it will generate all of the pages, just to preview
the first page.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
Also, we have run reports here with tens of thousands of pages, but memoy
usage all depends on what the report contains....
-
--
Tom Ollar
Digital Metaphors Corporation
http://www.digital-metaphors.com
info@digital-metaphors.com
there is any confusion.