?
Solved

indexing an array in Crystal Syntax

Posted on 2006-07-06
9
Medium Priority
?
476 Views
Last Modified: 2011-10-03
I would like to know the syntax on indexing an array in Crystal Syntax.  I am in the formula workshop, and am dealing with a database field that contains multiple values separated by semicolons.  Thanks
0
Comment
Question by:cpursley1979
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 16

Expert Comment

by:wykabryan
ID: 17050343
What version of CR are you using?  When you say, "database field that contains multiple values separated by semicolons", are these contained within one column?
0
 

Author Comment

by:cpursley1979
ID: 17050357
I am using Crystal designer 11.  Yes this is 1 column I am referencing.
0
 
LVL 16

Expert Comment

by:wykabryan
ID: 17050370
Ok.. you want to do something like this then.

{yourcolumn} in Split({column},',')
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:cpursley1979
ID: 17050538
Yes, I was thinking this:
//StringVar array months = split(sValues, ";");
//months[12];

but I know it is incorrect
0
 
LVL 16

Expert Comment

by:wykabryan
ID: 17050729
well, this appears to work after some rework

split(sValues,';')[12]
0
 

Author Comment

by:cpursley1979
ID: 17053386
How does this work?
0
 
LVL 16

Expert Comment

by:wykabryan
ID: 17053497
split will parse out the column.  The [12] indicated which object in the array you want to use.
0
 

Author Comment

by:cpursley1979
ID: 17053506
does split return a String type or numeric?
0
 
LVL 16

Accepted Solution

by:
wykabryan earned 2000 total points
ID: 17053538
split return a string.  The number only indicated the subscript that should be return to the report.  
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question