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

Help looking at a Graphic field.

edited June 2008 in General
Delphi7 and RB Enterprise10.07 build 2.

I'm running a report against a Paradox table and one of the fields is of
type "Graphic". This holds a users picture.

I've been asked to modify the report so that if this field is empty (no
picture), I should show some text to indicate that no picture is present.

Is it possible to do this ? If so, can you give me some tips ? At the moment
I'm using a "Calc" field but am not sure what code to use to see if it
contains data.

Ian

Comments

  • edited June 2008
    Hi Ian,

    If you are in Delphi, you can simply check the field value and if it is
    Null, hide the picture and show the text. In Rap, you can use the following
    method...

    ----------------------------------------------
    Tech Tip: RAP: Checking for Null Data Values
    ----------------------------------------------

    The DataPipeline.FieldObjects[] array property provides access to the
    TppField objects. TppField has an IsNull boolean property.

    The notation is DataPipeline.FieldObjects['FieldName'].IsNull

    example:

    if Customer.FieldObjects['Addr1'].IsNull then
    ShowMessage('field value is null');


    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2008
    Thanks Nico, That code snippet was exactly what I needed. My report now
    shows the data correctly.


This discussion has been closed.