Solved

Using replace in crystal reports

Posted on 2010-09-07
5
419 Views
Last Modified: 2012-05-10
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
Comment
Question by:Prefuse
5 Comments
 
LVL 42

Expert Comment

by:sedgwick
ID: 33618419
i don't think u can perform multiple replace string text in a single line, you got have it deparated lines.
0
 
LVL 77

Expert Comment

by:peter57r
ID: 33618446
Try...
Replace(Replace({CFG8ORDER.STATUS}, "LINKED","Spun",1,-1,0) "QUOTE","Entered",1,-1,0)
0
 
LVL 8

Accepted Solution

by:
kingjely earned 500 total points
ID: 33618506
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
 

Author Comment

by:Prefuse
ID: 33618511
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
 

Author Closing Comment

by:Prefuse
ID: 33618562
Superb! Thanks for that, worked a treat!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

829 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