Skip to Content
0
Former Member
Jun 10, 2010 at 05:37 PM

replace formula: how to put several replacements in one formula

7365 Views

Hello, I have a Crystal report in which I need to apply replace formula to strings of text that have multiple values that need to be replaced. Example lets say the field name of my text sting is "textdata" and it contains this value: one,two,three-four&five. now, I want to replace any of these characters , - & with a blank space " ". so,the only way I could figure out how to do this was to make several formulas as follows:

formula 1: replace (textdata, ",", " ")

formula 2: replace (formula 1, "-", " ")

formula 3: replace (formula 2, "&", " ")

now formula 3 give me the final result I am looking for with all those items replaced.

Can anybody show me in detail how to accomplish this by just using one formula?

thank you in advance for any suggestions or help, it is much appreciated.

steve