Tips and Tricks
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Tips and Tricks
Message Icon Topic: Substring from a string Post Reply Post New Topic
Author Message
manojsatija
Newbie
Newbie


Joined: 09 Feb 2009
Location: India
Online Status: Offline
Posts: 2
Quote manojsatija Replybullet Topic: Substring from a string
    Posted: 09 Feb 2009 at 4:47am
I am having a text column with the value like 'a,b,c,d' . I want the result as a,b,c,d . I need to compare a,b,c,d seprately with some other values.
 
I am using Crystal XI with Oracle DB 9i.
 
Please help
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 10 Feb 2009 at 3:35pm

Try using the "Split" function.  Your formula (I'll call it {@Values} will look something like this:

StringVar Array values = split({table.field}, ',')
 
You can then use the values array in other formulas to do your individual comparisons.  You just need to remember to declare it in each formula where it's used so that the formula knows about it.  This will look like this:
 
EvaluateAfter {@Values};
StringVar values;
<do your comparison>
 
If you haven't used variables in Crystal before, they can be a little tricky.  So, if you let me know specifically what your trying to do with your comparisons, I might be able to help with the exact syntax.
 
-Dell
 
 
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
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



This page was generated in 0.031 seconds.