Hi
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?

Thanx

Recommended Answers

All 2 Replies

It's been years since I worked with CRPE, but I believe you need to create a text field with a formula that uses an expression, such as:

if (pmtType == 0)
    text = "Cheque";
else // or, else if
    text = "Cash";

Create a formula field with following code:

if {TableName.Field}=0 then 'Cash' else 'Cheque'
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.