Solved

Using replace in crystal reports

Posted on 2010-09-07
5
392 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
This is about my first experience with programming Arduino.
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…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now