Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: extract delimted values and link to diff tables Post Reply Post New Topic
Author Message
jimbo79
Newbie
Newbie


Joined: 03 Aug 2011
Online Status: Offline
Posts: 4
Quote jimbo79 Replybullet Topic: extract delimted values and link to diff tables
     Posted: 03 Aug 2011 at 5:20am
Hi, I'm having trouble extracting some data.

Table 1
field 1 field 2 field 3
1          a        Fred
2          b        John
3          c        Paul

Table 2
Field 1 field 2
1          a,b
2          b,c
3          a,c


So table 2 field 2 are comma delimited values.
Each value relates to table 1 field 2.

If I know Table 2 field 1, I want to display table 1 field 3.

My current plan is to convert the string to an array and then make a loop that extracts each element of table 2 field 2 from the array and somehow equates that element to table 1 field 2 to then derive table 1 field 3.

Am I on the right track? Is this even possible in formula workshop?

Any suggestions would be grateful. Apologies if  I've not made myself clear.
James
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 03 Aug 2011 at 5:40am
you can just setup a formula to pull right(field2,1) and left (field2,1)

if there are only two variables, separated by a single comma
IP IP Logged
jimbo79
Newbie
Newbie


Joined: 03 Aug 2011
Online Status: Offline
Posts: 4
Quote jimbo79 Replybullet Posted: 03 Aug 2011 at 11:33am
Sorry I'm not sure I understand what you mean.
I need to display the values of table 1 field 3 based on me knowing table 2 field 1 and I don't see how your suggestion would work.
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