INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Crystal Reports 2011 Replace Function

Crystal Reports 2011 Replace Function

(OP)
Hello!
I need help! I created a formula that would appear as its own column in the report. In the formula I am telling it to replace several benefit plans to different text. For example, I have a Benefit Plan labeled HMNT1 and I want it to read HMO Member Only. I work in HR and we have several Benefit Plans that I wanted renamed to read a better description. Below is the formula I used in the Formula Editor. It only replaced the last row, not any of the others. Any assistance you can provide is appreciated.

(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "H+1ATU", "HMO M + 1"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HDNT1", "Dental M Only"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HDNT2", "Dental M + 1"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HDNT3", "Dental Family"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HDT1", "Dental M Only"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HDT2", "Dental M + 1"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HDN3", "Dental Family"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HF-ATU", "HMO Family"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HMNT1", "HMO M Only"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HMNT2", "HMO M + 1"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HMNT3", "HMO Family"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HMO+1U", "HMO + 1"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HMOATU", "HMO M Only"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HMOEOU", "HMO M Only"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HMOF-U", "HMO Family"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HMT1", "HMO Employee Only"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HMT2", "HMO M + 1"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HMT3", "HMO Family"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HPNT1", "PPO M Only"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HPNT2", "PPO M + 1"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HPNT3", "PPO Family"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HPT1", "PPO M Only"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HPT2", "PPO M + 1"));
(Replace ({PS_HEALTH_BENEFIT.BENEFIT_PLAN}, "HPT3", "PPO Family"));

RE: Crystal Reports 2011 Replace Function

I think a switch statement is probably closer to you want to accomplish unless the search text is only part of the text that is in the {PS_HEALTH_BENEFIT.BENEFIT_PLAN} field.

Example: switch({PS_HEALTH_BENEFIT.BENEFIT_PLAN}= "H+1ATU", "HMO M + 1",{PS_HEALTH_BENEFIT.BENEFIT_PLAN}= "HDNT1", "Dental M Only", and so forth.

RE: Crystal Reports 2011 Replace Function

(OP)
You are a genius! Thank You. That worked like a charm and I know I can use it for other things.

Thank You!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close