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

Load Image via Code

edited May 2011 in General
hello,

When loading an image by RAP, if it does not exist shows an exception.

I would treat this by placing before the load if a filexists (....

I could not, is it possible?

Comments

  • edited May 2011
    Hi Gustavo,

    RAP does not have the FileExists routine built in however it would be
    very easy to create a pass-thru function that does so. Take a look at
    the main RAP demo located in the \Demos\0. RAP\... directory for
    examples of how to create and use pass-thru functions.


    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2011
    The TppDBImage can optionally be connected to a string field that contains
    an image file name. It will internally check whether the file exists and
    load the image.

    I don't know whether this would be an option for you, but thought I would
    mention it.

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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited May 2011
    Nard

    Can that be achieved via the editor or do you need Delphi code?

    This would be a useful function for our end users - is there any
    documentation anywhere?

    Regards

    Rod

  • edited May 2011
    You just need to set the DBImage DataPipeline and DataField properties to
    bind to a datafield of type string.

    The RBuilder help topic for TppDBImage needs to be updated - this will be
    included in the next maintenance release.

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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.