troubleshooting Question

Splitting multiple fields in Crystal Reports formula

Avatar of w00k
w00k asked on
Crystal Reports
3 Comments1 Solution776 ViewsLast Modified:
Hey Experts...I need some help expanding on a formula I've been using to format a field in my report.  I need to be able to split a second field called "v_cases.second_surgeon_procedures" .  I want to place both of these fields into my report under a single column called "Procedures".  Can someone tell me the right syntax to use if I want to add this field to the formula below.  Can the split function even be used to split multiple fields? tia  

StringVar str := "";

if not ISNULL({cases.first_surgeon_procedures}) then
(
    stringVar array tempArray;
    tempArray := split({cases.first_surgeon_procedures}, " ");
    NumberVar strLen := UBound(tempArray);
    NumberVar i;

    For i := 1 To strLen Do
    (
        if str = "" then
            str := tempArray[i]
        else if InStr(tempArray[i], "(") > 0 then
            str := str + chr(13) + tempArray[i]
        else
            str := str + " " + tempArray[i];
    );
);
str;
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros