Click to See Complete Forum and Search --> : change report field text based on db value


sirimewan23
April 22nd, 2010, 04:21 AM
I am new to crystal reports ..guys pls help me in this thing

in my data set I have fld PAYMENT_TYPE fld,and this data set connecting with crystal report calld
I need to do this inside this report.and data set contains many records
when PAYMENT_TYPE=1 disply "cash"
when PAYMENT_TYPE=2 disply "cc"

how can i do this

jggtz
April 23rd, 2010, 04:49 PM
Insert a new formula field, call it the name you like
Inside the formula editor, write

If {TableName.FieldName}=1 Then "Cash" Else
If {TableName.FieldName}=2 Then "CC" Else "Other"

After that, place the formula in the desired rpt section
Note: Replace TableName and FielName with real ones
Here we are assuming that the field is numeric type

JG