Mark Wilson
asked on
Replace Problem
I have data in one of the fields I am reporting against as below
Will for John Smith
Will For John Blogg
I want to remove the Will for to just have the name left i.e. John Smith, John Blogg
I am using the formula below
replace(database_field, 'Will for ','')
When I use this I am left with
John Smith and Will For John Blogg, i.e. it still leaves the one with the capital F for For.
How can make this work so I am left with John Smith, John Blogg from the example data
Will for John Smith
Will For John Blogg
I want to remove the Will for to just have the name left i.e. John Smith, John Blogg
I am using the formula below
replace(database_field, 'Will for ','')
When I use this I am left with
John Smith and Will For John Blogg, i.e. it still leaves the one with the capital F for For.
How can make this work so I am left with John Smith, John Blogg from the example data
It appears the formula is used not used in the group or details sections. The formula field must be in the group or details section. If the field is not group or details sections the formula is not run for each record.
If you want to complete the replacement before crystal loads the data, you can use a t-sql statement to the database. Here are instructions http://hexcentral.com/articles/crystal-sql.htm.
nest the replace function?
replace(replace(database_f ield, 'Will for ',''),'Will For ','')
replace(replace(database_f
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@mlmcc - excellent!
Where does one find formal online doco for crystal functions these days?
Where does one find formal online doco for crystal functions these days?
I don't know of an online help. I use the help from Crystal installed on my machine.
mlmcc
mlmcc
:( pity - thanks anyway