[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 444
  • Last Modified:

Using replace in crystal reports

Hello, I am trying to use repalce in crystal reports to replace two tex values with two others.

I have a formular working thus far -

Replace({CFG8ORDER.STATUS}, "QUOTE","Entered",1,-1,0)

That works fine, what I need to do is add exactly the same but as this -

Replace({CFG8ORDER.STATUS}, "LINKED","Spun",1,-1,0)

If I use the and commnad add the above text the formular errors.

I am not sure how to get the formular in to one row?

Thanks!
0
Prefuse
Asked:
Prefuse
1 Solution
 
Meir RivkinFull stack Software EngineerCommented:
i don't think u can perform multiple replace string text in a single line, you got have it deparated lines.
0
 
peter57rCommented:
Try...
Replace(Replace({CFG8ORDER.STATUS}, "LINKED","Spun",1,-1,0) "QUOTE","Entered",1,-1,0)
0
 
kingjelyCommented:
Hi

Make a formular

stringvar replaceme;

replaceme := Replace({CFG8ORDER.STATUS}, "QUOTE","Entered",1,-1,0);
replaceme := Replace(Replaceme, "LINKED","Spun",1,-1,0);

...
replaceme
0
 
PrefuseAuthor Commented:
That didn't work, it errors saying ) is missing and highlights the QUOTE text?

The problem with having two formula for each occasion is having to have two formula on the details section, they will both show on the report a seperate entities. I need a combined output result. :(
0
 
PrefuseAuthor Commented:
Superb! Thanks for that, worked a treat!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now