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

load pic in detail band?

edited January 2004 in General
hi
I save the path-name of my picture in the database.
I put 3 dbimage components in the detail band.
I wnat my program read the path-name from the database and load the real
picture to the dbimage components.
There may be many path-name in the database , so I put it to the detail
band.
How can I make the mission?
Thanks

Comments

  • edited January 2004
    If you whant to use the DBImage component you have to save the image in the
    database, not the path to it.
    Normaly you can load the image by doing LoadFromFile with a normal Image
    component but I don't
    know if that workes mit the RB Image component. Try it :)


  • edited January 2004
    Hello,

    Ace is correct. The DBImage component can only be used to load images saved
    in a BLOB field on your database. If you would like to use the path names,
    I would suggest writing a delphi function that extracts the path name from
    your table, then sets the Picture equal to that file name. Something like
    the following...

    procedure LoadImageFromPath;
    var
    lFileName: String;
    begin

    lFileName := Report.DataPipeline['ImageFileName'];
    ppImage1.Picture.LoadFromFile('lFileName');

    end;

    --
    Best Regards,

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