Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Crystal Reports 2008

Posted on 2011-02-28
6
Medium Priority
?
239 Views
Last Modified: 2012-05-11
Hello,

I would like to change the word result on my report from what is given by my database to something else.

So lets say the database gives me a result of AA, and in the report I would like Banana to show up. What formula should I use?

Thank you
0
Comment
Question by:lodgingsit
  • 3
  • 3
6 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 34998487
A formu;a like

If {MyField} = 'AA' then
    'banana'
Else if {MyField} = 'BB' then
    'apple'
etc

mlmcc
0
 
LVL 1

Author Comment

by:lodgingsit
ID: 34999035
Thanky you mlmcc. I get an error message which says A boolean is required here...
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 34999251
Where are you putting the formula?

You should just create a formula in the field explorer and then drag the field to the report

mlmcc
0
How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

 
LVL 1

Author Comment

by:lodgingsit
ID: 34999757
Hello,

I was doing it under Select Expert. Your suggestion worked. Small problem with this solution however is that lets say AA is shown as banana and BB is shown as apple and currently I have no idea what future results may be.

So say in one week CC comes out but I don't have it in the code. I would not like the field to be empty, so what should I add at the end of the formula to have CC show up there? Basically after:

If {MyField} = 'AA' then
    'banana'
Else if {MyField} = 'BB' then
    'apple'

I would want Else display answer as is. How would I do that?

Please let me know if you need further clarification. Thank you.
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 1000 total points
ID: 35000013
Try

If {MyField} = 'AA' then
    'banana'
Else if {MyField} = 'BB' then
    'apple'
Else
   {MyField}

mlmcc
0
 
LVL 1

Author Closing Comment

by:lodgingsit
ID: 35000126
Thank you mlmcc this was great.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month12 days, 14 hours left to enroll

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question