Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Out of Memory writing to file.

edited January 2002 in General
Using RB6.03, D5, W2K.

I am writing a report to generate a fixed length text only output file. I am
processing the report with 2000 records and all works fine. When I run
15,000 records, the report blows an out of memory error. I have turned
CachePages off. All output is to a file, not to screen or printer.

Is there something I am doing wrong or is there a fix for this?

Thanks,

Andy

Comments

  • edited January 2002
    First, run your project through a memory resource analyzer to search for
    memory leaks. Otherwise, you are running up against the limitations of your
    machine. After CachePages is turned off, there isn't much else to reduce the
    memory usage to create the report in RB.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited January 2002
    Try setting the Report.CacheManager.CacheType to ppCTFile at runtime.

    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


This discussion has been closed.