I want to show a crystal report in my windows application.In my Access DataBase I have a column called Payment type and its type is number.(ie data in that column is stored as 0 or 1).If payment type is 0 I want to show it as a string called "Cheque" and if it is 1 I want to display "Cash" in my crystal report.How can I do it?


Use Formula field or select Format Object menu option of context menu.

if col1=1 then "A" else "B"

thanx for the help Nichito.But I want to know how to give the formula?

Can you give me the syntax for the fomula?

See Post #3. It has a syntax of formula.

When I type this code in show formula
if({PAYMENT_MST.ChequeType})=0 then 'Crossed Cheque'
it gives a error message saying "the result of a selection formula must be a boolean"
Can you help me with this?

if {PAYMENT_MST.ChequeType}=0 then 'Crossed Cheque' else 'Cash'


if {PAYMENT_MST.ChequeType}='0' then 'Crossed Cheque' else 'Cash'

But still it displays the numbers ie 0 and 1
Have any idea where I have gone wrong?Thanx for taking trouble .

You have to drag a formula field into the display area of crystal report.