Solved

indexing an array in Crystal Syntax

Posted on 2006-07-06
9
460 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
 

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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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 …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now