Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

indexing an array in Crystal Syntax

Posted on 2006-07-06
9
Medium Priority
?
478 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

 

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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

610 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