I like SV's approach except that it isn't really complete...for example: What if we had CPA, CPa, Cpa or cpa
these are 4 different searches when only one is needed.
Also you can set up an array in a formula hidden in the report header to assign not only the search criteria but also the replacement value....I'll show you.
Let us say we want the following spellings to be exactly like this
PhD, CPA, BSc
Create an assignment formula
******************************************
@ExactSpellings (place suppressed in the report header)
WhilePrintingRecords;
stringVar array spellings := ["PhD","CPA","BSc"];
//add this since the result of a formula cannot be an array
" ";
******************************************
Now in the formula that prints the name or whatever do this
******************************************
@DisplayCorrectSpelling
WhilePrintingRecords;
stringVar array spellings;
stringVar MyField := {Table.textstring}
numberVar icount;
numberVar iPos;
for icount := 1 to ubound(spellings) do
(
iPos := instr(uppercase(Myfield),
uppercase(spellings[icount]))
if iPos <> 0 then
Myfield := left(Myfield,iPos -1) +
spellings[icount] +
right(Myfield,length(Myfield) -
iPos - length(spellings[icount]) + 1);
//if you are only replacing one exception
//you could "Exit For" at this point By adding it to
//a block of if statements above
);
Myfield;
******************************************
this would have to be modified if there was more than one instance of the exception in a field but it doesn't look to be the case here.
There you go...only maintenance required is to the @ExactSpellings formula in the report header....I would personally use a background of red so that it sticks out in design (the formula would have a conditional suppress using the formula
1 = 1
This way it always suppresses but Crystal will maintain the color in design.
hope that helps Jim Broadbent