Home
Crystal Reports Training
Crystal Reports XI
Crystal Reports .NET
Crystal Reports Forum
News
Tech Support
Active Topics
Memberlist
Search
Help
Register
Login
Technical Questions
Crystal Reports Forum
:
Crystal Reports 9 through 2022
:
Technical Questions
Topic: Split function ??
Author
Message
jbalbo
Senior Member
Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Topic: Split function ??
Posted: 20 May 2011 at 4:31am
Hi,
I have an array "1000,2000,3000...)
Do i use split?
But the length of the array can vary, how can I split all elements?
Thanks In advance
Joe
IP Logged
Keikoku
Senior Member
Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Posted: 20 May 2011 at 4:44am
Do you have an "array" or do you have a string separated by commas?
Split is a string function.
It will split on all instances of the specified delimiter.
If for example your string was
"1,2,3,4" and you split on "," then you will get ["1", "2", "3", "4"]
If your string was "1,2" and you split on the comma again, you will get ["1", "2"]
etc
IP Logged
jbalbo
Senior Member
Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Posted: 20 May 2011 at 4:59am
It is a string seperated by commas
but they vary in length,
Actually now thinking...
what I really want to do is base a formula on what the string contains....
example
string = "1000,2000,4000"
then in a formula,
if "the string" contains "1000" or "4000" then ......
Thanks
IP Logged
Keikoku
Senior Member
Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Posted: 20 May 2011 at 7:29am
but they vary in length,
You can use InStr to determine whether the string contains the specified substring or not.
ie:
If InStr(string, "1000") or InStr(string, "4000") Then ...
IP Logged
jbalbo
Senior Member
Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Posted: 20 May 2011 at 10:23am
great.. thanks will try..
can I use "and" also instead of or?
IP Logged
Printable version
Forum Jump
-- Select Forum --
Announcements
Talk with the Author
Self-Publishing
Job Postings
New feature request
Report Design
Data Connectivity
Technical Questions
Tips and Tricks
Crystal Xcelsius
Report Design
Data Connectivity
Writing Code
Tips and Tricks
Report Design
Data Connectivity
Writing Code
Tips and Tricks
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
delete your posts in this forum
You
cannot
edit your posts in this forum
You
cannot
create polls in this forum
You
cannot
vote in polls in this forum
HOME
|
FREE EBOOK
|
PROGRAMMING GUIDE
|
PURCHASE
|
REVIEWS
|
CONTACT ME
|
FAQ
|
LINKS
|
PRIVACY
|
CLICK PLAYS
|
KONACAD
© 2004-2026 Brian Bischof. All Rights Reserved.