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

DBImage and different image formats

edited April 2004 in End User
Hi,

RB Enterprise 7.01

We have created a report, added a DBImage to the report and link it to a
Blob field (SQLServer 2000, image field). In this field the user can put
BMD and JPG images.
When the user addes a jpg image and tries to run the report a message
'invalid image format' shows up. Can a DBImage dynamically handle
different image types.

Please note that we deliver enduser reporting so we can't figure this
one out programatically.

regards
Paul Sjoerdsma

Comments

  • edited April 2004
    Hi Paul,

    When placing a DBImage component on a Report, be sure to set the "Graphic
    Type" property to JPEG. This property is available to the end-user by right
    clicking on the DBImage object and selecting it from the popup menu.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2004
    Hi Nico,

    Thanks, at the moment I can only see
    Bitmap
    Icon
    Metafile

    How do we add the jpeg type, do we need to include or uncomment some
    piece of code?

    2- What if different image types are mixed. Users could insert a bitmap
    or a jpeg. Does your solution still work. It sounds to me like it is
    mutually exclusive, is this correct?

    regards
    Paul

    In article <4090f88d$1@dm500.>, support@digital-metaphors.com says...
  • edited April 2004
    Hi Paul,

    1. You need to add ppJPEG to your uses clause to add JPEG support to
    ReportBuilder.

    2. When an application loads an image from file, it will look at the file
    extention for the graphic type. When loading an image from a BLOB field,
    there is no extention so the application has no way of knowing which type if
    image is being loaded unless it is pre-defined. If you have a field in your
    database with different types of images in it, you could change the
    GraphicType property in the DetailBand.BeforePrint event based on which
    image it is or create a new field in your table that defines the image type.
    Otherwise, your end-users will need to change the graphic type manually
    using the popup menu or each image field will need to contain the same type
    of image.

    --
    Best Regards,

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