Runtime picture's in a report

edited March 2011 in End User

In my report I have a Image object and the picture that must be showned
depends on the value of a text item in the report. At design time is the
value of this textitem is unknown, so we have to place the picture at
runtime when the value is known.
How can I place at runtime a picture in a report? A numeric value is also
available so the case statement can use a numeric value if that is

See the example below:
case textcode of
'user1': picture := pictureA;
'user2': picture := pictureB;
'user3': picture := pictureC;

Hanjo Willems
iSOFT Nederland B.V.


  • edited March 2011
    Hi Hanjo,

    Once you know which picture you need to display, you can simply call the
    TppImage.Picture.LoadFromFile or LoadFromStream routines to manually
    load the correct image. Note that this must be done before the image
    prints (the best place would be in the Band.BeforePrint event or earlier


    Nico Cizik
    Digital Metaphors

    Best Regards,

    Nico Cizik
    Digital Metaphors
  • edited March 2011

    A couple of options..

    Store the pictures in a database and then use DBImage to print them.

    Store the picture filenames in a database and then use DBImage to print
    them. (If DBImage is connected to string field that contains the filename of
    a picture, it will load it from file automatically.)

    If you don't want to store the pictures or picture filenames in a database,
    consider using a JITPipeline to return the values, then it will still work
    like above.

    Nard Moseley
    Digital Metaphors

    Best regards,

    Nard Moseley
    Digital Metaphors
This discussion has been closed.