Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Search & Extract Post Reply Post New Topic
Author Message
verniqueb
Newbie
Newbie


Joined: 04 May 2009
Location: United States
Online Status: Offline
Posts: 12
Quote verniqueb Replybullet Topic: Search & Extract
     Posted: 26 May 2009 at 2:02pm

I have a field where each months budget is stored separated by a comma.  I have to extract each months budget from the string and show on the report.

 

I was able to use a combination of the InStr & Left Function to extract the 1st months budget.  I use a combination of InStrRev & Mid function to retrieve the last months budget.

 

I need some help in creating a formula to extract months 2 – 11 budget.  Which functions can I use to search the field for the 2nd, 3rd, 4th, 5th etc. comma extract the number?  will this be handled better by a loop?

VB
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 27 May 2009 at 6:48am
before i would have given a formula, but as seen in another post...try split and place it in an array, then you can assess the array to either fill variables or directly display them.  If you are going to directly display, you will need a shared array.
 
Give split a try.  The only caveat is if your data has embedded commas (I've seen data that has embedded commas in a comma delimited file from a major corporation, so it can happen :(  )
 
HTH
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 27 May 2009 at 7:36am
hi
 
can you post sample date for each months and what you want to show
 
cheers
Rahul
IP IP Logged
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