Solved

indexing an array in Crystal Syntax

Posted on 2006-07-06
9
466 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
  • 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

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 500 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
Crystal Reports get subgroup count 1 54
Printing duplex pages and have a page break 6 48
Crystal Report detail 15 51
Crystal report highlighting 5 44
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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

791 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