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

Expressions for DBText

edited December 2004 in General
Hello,
I want to make an expression that shows me for Fieldvalue "1" a "mr." for
"2" a "Mrs." and for "3" a "Family". Like
DB.address=1?'Mr.':DB.address=2?'Mrs':DBaddress=3?'Family'
or
if DB.address=1 then 'Mr' elseif DB.address=2 then 'Mrs else if DB.address=3
then 'Family'
is it possible to make any of these expressions?
thanks
Pascal Rohde

Comments

  • edited December 2004
    Hi Pascal,

    There are probably many ways to go about this. I would recommend placing a
    TppVariable in your detail band and in the DetailBand.BeforePrint event,
    check the field value and adjust the value of the TppVariable accordingly.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2004
    > if DB.address=1 then 'Mr' elseif DB.address=2 then 'Mrs else if

    The other way is to create a lookup field at the dataset. The advantage of
    this is that you can use it for display purposes in your application and
    some 3rd party controls will allow selection via lookup fields.

    Ed Dressel
    Team DM
This discussion has been closed.