Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports - Split String Help

Status
Not open for further replies.

feeldamped

Technical User
Oct 3, 2018
1
US
Hi Guys!


I have a field that I am trying to split to create a chart from on my report.

The report is coming from Survey results, however, the answer options are all in the same column/field like this:

Option 1;Option 2;Option 3;Option 4
True;False;Skip
Eastern Office;Western Office
etc

The different answer choices are all split up by the ; -- how can I use Split to show them as separate answers?

I tried:

Code:
Split ({SURVEY_QUESTION.ANSWER_OPTIONS},";")

But it is saying "The result of a formula cannot be an array."


Thanks for the help!!
 
Create formulas like this:

//{@1st element}:
Stringvar x := {table.answer};
Stringvar array y := split(x,”;”); //replace these iPad quotes with your own
If ubound(y)>=1 then
y[1]

Repeat for each possible element, changing the 1 in both places.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top