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

Printing Images

edited July 2002 in General
Hi,
I print images in a detail band, and the images are loaded at run time
with rap. Some images i want to be printed in its original size but other
images has the width value greater than the detail band, and i want to
strech them. Where and when can i know if this happens and correct it.

Regards
--
Jes?s Angel Garc?a Zarco
Cointec

Comments

  • edited July 2002
    You can load it into a TPicture outside of RB. Use the
    DetailBand.BeforePrint event to perform the check. Use the TPicture object
    to check the image's width and height. Then if it is too big to fit in the
    report page, then you can configure the TppImage control before assigning
    the picture to it.

    FPicture := TPicture.Create;

    FPicture.LoadFromFile('C:\Pix\P3230059.bmp');

    {check FPicture width and height}

    {resize TppImage if necessary}

    ppImage1.Picture.Assign(FPicture);

    FPicture.Free;


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.