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

ppImage1.Picture.LoadFromStream ??

edited July 2004 in General
(D7, RB 7.04, SQL2K)
In BeforePrint, I need to load an image from a stream but the following
gives me a syntax error on "LoadFromStream".
Can someone tell me how to do this?

tia

procedure TForm1.ppDetailBand1BeforePrint(Sender: TObject);
var BlobStream: TStream;
begin
BlobStream := CreateBlobStream(q.FieldByName('BlobImage'), bmRead);
ppImage1.Picture.LoadFromStream(BlobStream);
BlobStream.Free;
end;

Comments

  • edited July 2004
    Hi Sydney,

    The TppImage.Picture property is a TPicture object that does not have the
    LoadFromStream method available. You will need to use the TPicture.Bitmap
    or TPicture.Graphic properties to get at this routine.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.