I think this might work for you. The result is each 'item' separated by a carriage return, so when you drop this formula onto the report, make sure it's formatted as 'Can Grow':
StringVar str := {Table.YourStringField};
NumberVar i;
StringVar strTemp;
For i := 1 to len(str) do(
if strcmp(UCase(str), str) = 0 then
strTemp := strTemp + " " + str
else
strTemp := strTemp + str);
Join(Split(ltrim(strTemp), " "), chr(13));
The logic here is to loop through the string one character at a time, and add it to a temporary string. If the current character is upper case, a space is added before adding the character to the temp string. Once the looping is through, using a combination of the Split and Join functions, you end up with the desired (I think) result.
If you've got CR 8.5, you might get into trouble with the 255 character string limit if there are too many 'items' in your list.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.