Solved

Using replace in crystal reports

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

732 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