Solved

Using replace in crystal reports

Posted on 2010-09-07
5
425 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

749 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