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

How to detect a blank blob field (RB10 Deplhi 6)

edited June 2009 in General
Hi

I need to switch off a subreport if a certain field (which is an ORACLE
BLOB) is blank.

I have tried length = 0 and is NULL but neither work on the BLOB.

Is there a function or a tip you can give me to know when a BLOB field is
blank. I would prefer to do this inside Report Builder than having to change
the view feeding the report.

An example of use is as follows (this does not work however as the subreport
still shows)

if V_DOC_CANCELLATIONS['NOTES'] is NULL then subCanxNotes.visible :=
False;
if V_DOC_CANCELLATIONS['DOC_NOTE_AFTER'] is NULL then
subDocNoteAfter.Visible := False;

Which has been placed in the BeforePrint Event.

Regards
Andrew

Comments

  • edited June 2009
    Hi Andrew,

    In my testing with a blank Oracle BLOB field, testing for NULL seemed to
    function correctly.

    In Delphi...

    if Report.Datapipeline['MyField'] = NULL then
    ...

    In RAP...

    if DataSet.['MyField'].IsNull then
    ....

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2009
    Nico

    Thanks for that

    I tried

    if DataSet.['MyField'].IsNull then

    and got a compile error saying it expected ( or [ but found isNull.

    Regards
    Andrew


  • edited June 2009
    Hi Andrew,

    Sorry, "DataSet" should have read "MyDataPipeline" and should be the name of
    your pipeline in RAP.

    For future reference, if you are using RAP, please post to the RAP
    newsgroup.

    --
    Regards,

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

    Best Regards,

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