Home General

Unit file size

edited August 2010 in General
I have a datamodule(Unit4) that contains some reports. The file size for
unit4.dfm over time has grown to 85 meg and is causing problems when saving
(time / out of memory etc).
If I save one of the reports it's file size is 6 meg.
It contains 3 images and some db fields etc.
The images are
62.jpg size = 25.5 kb
BPA SQUARE LOGOsmall.jpg = 22.7 kb
BPA LOGOsmall.jpg = 43.kb

If I delete 62.jpg the file size is 6,115 KB
If I delete BPA SQUARE LOGOsmall.jpg the file size is 4,418
If I delete BPA LOGOsmall.jpg the file size is 1,879

If I deleted BPA LOGOsmall.jpg & BPA SQUARE LOGOsmall.jpg the file size is
112kb.


Any ideas why the file sizes are bloating?

Comments

  • edited August 2010
    Hi Steve,

    Which version of ReportBuilder and Delphi are you using? The TppImage
    object saves all images down as bitmaps so this will increase disk usage
    however I have not seen the file size you are mentioning in my tests here.
    If possible please send the images to support@digital-metaphors.com in a zip
    file so I can test with them.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2010
    Delphi 7
    RB 9.01
  • edited August 2010

    I emailed you a simple example project that I built using D7 and
    ReportBuilder 12.01. The first unit contains a form with three TImage
    objects that contain the three images you sent. The second unit contains a
    report with three TppImage objects that contain the three images you sent.
    The .dfm file sizes are very close - the small difference due to the report
    layout objects (report.bands[].objects[]).

    In the example each Dephi Form is configured with the Save As Text option
    set to False. This greatly decreases the size of the .dfm. (Press the right
    mouse button while positioned over the form and you can select this option
    from the context menu).

    Overall I recommend redesigning your application to be more efficient. The
    main Demo project included with RB contains hundreds of reports and is
    optimized for efficient use of resources and speed. The reports reside on
    separate forms and the forms are created/freed upon demand. The Developers
    Guide report application tutorials contains a step by step example for
    creating this type of application.



    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.