troubleshooting Question

How to split a Text field using a delimiter and gather values

Avatar of JMO9966
JMO9966 asked on
Crystal Reports
2 Comments1 Solution2336 ViewsLast Modified:
I've done this easily with VB.Net but struggling here.

I have a report field on this Crystal Report that is a Text field.

This text field will hold two values seperated by a comma.  In certain cases, this field may be null or not have a comma also.

I need to gather the value prior to the comma with a Crystal Formula if a comma exists in the text field.

Here's my attempt:

Local StringVar result;
Local StringVar Array resultArray;
resultArray = Split ({MC_PurchaseOrder_TTX.Note_Text}, ",");
result := resultArray(1)

Thanks for the assistance.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 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 2 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