Print Page | Close Window

Substring from a string

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Tips and Tricks
Forum Discription: Have you learned some great tricks to share with the group? Post them here!
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=5459
Printed Date: 03 May 2024 at 2:24am


Topic: Substring from a string
Posted By: manojsatija
Subject: Substring from a string
Date 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



Replies:
Posted By: hilfy
Date Posted: 10 Feb 2009 at 3:35pm

Try using the "Split" function.  Your formula (I'll call it mailto:%7b@Values - {@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 mailto:%7b@Values - {@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
 
 


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window