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

Linking to Jpeg Image stored in Database

edited September 2010 in General
I have a report which links to an image field in a TDataSet. When this
is a bitmap then all is well, but it won't even open the report if it
is a JPEG.

What's the best way to handle this?

Thanks

--

Comments

  • edited September 2010
    For RB 12, set DBImage.GraphicType to AutoDetect and it will automatically
    determine the graphic type by analyzing the stream header.

    For prior versions, set DBImage.GraphicType to JPEG and include ppJPEG in
    the uses clause of the project.




    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited September 2010
    Thanks. I am using 11. Is there a way to default this when an DBImage
    is created. At the moment it throws an exception when an image field is
    dragged onto the designer and then when you do any actions until the
    type is set to JPEG.

    I have tried setting the GraphicType to JPEG in the
    Designer.OnComponentCreate which is half way there but it still throws
    an exception before this event is called.

  • edited September 2010

    I recommend updating to RB 12. The DBImage.GraphicType defaults to
    AutoDetect. Download a trial version and give it a try.

    Using the OnComponentCreate would have been my other recommendation.


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited September 2010
    Well, yes that would be an option but as this is a sytem that I'm doing
    for my daughter's Ph.D that is the expensive option as I won't get to
    charge it on to a client :-)

This discussion has been closed.