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

File size growing

edited February 2007 in General
Delphi 7
I have a datamodule with approx 20 datapipelines and 50 reports.

As the app has grown the time to open the datamodule is getting longer and
longer and resources going to 90-95%.

I have been sniffing around and moved 1 report to a new datamodule. (Unit5)
the dfm for this file is 42,492 kb if I reduce the size of images within the
report the dfm reduces to 6,132kb. So i am presuming the file size (and
overload to delphi) is coming from image within the reports. If so how do I
load the images at run time?

Any inf appreciated.

SteveW

Comments

  • edited February 2007
    Hi Steve,

    You can use the Picture property of the TppImage to manually load an image
    at runtime. Take a look at the TPicture topic in the Delphi help for more
    information.

    TppImage.Picture.LoadFromFile();

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2007
    I put the images in a database and replaced the ppImage with a ppDBimage.
    The size of the dfm is a lot smaller and the images load at runtime.

    However......

    Within the IDE I can view and print the reports. When I run the app I get an
    error saying 'cannot generate report' 'bitmap image is not valid.'

    I have set the image type to jpeg and can view within the IDE.

    Any ideas please

    Cheers

    SteveW

This discussion has been closed.