change report field text based on db value
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
Re: change report field text based on db value
Insert a new formula field, call it the name you like
Inside the formula editor, write
Code:
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