Check if field exists
I have created a report that performs a calculation on a field which may or
may not exist in the pipeline. I would like to be able to check to see if
the field exists and if not then use a different field for my calculation.
Can anyone tell me how to do this?
Thanks in Advance,
Nick
may not exist in the pipeline. I would like to be able to check to see if
the field exists and if not then use a different field for my calculation.
Can anyone tell me how to do this?
Thanks in Advance,
Nick
This discussion has been closed.
Comments
I assume you are TppVariable. basically, create two OnCalc event
handlers. Put each of the different calculations in different event
handler.
In the AfterOpen event for the TQuery, spin through the FieldDefs to
look for the field name in question. Assign the event handler based
on the outcome of this search.
- Rich Poletti