Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Data Selection using Formula field Post Reply Post New Topic
Author Message
boss1b
Newbie
Newbie
Avatar

Joined: 03 Dec 2009
Location: United States
Online Status: Offline
Posts: 2
Quote boss1b Replybullet Topic: Data Selection using Formula field
     Posted: 03 Dec 2009 at 7:52am
I'm rather new to Crystal Reports, using ver 11.  Can some one tell me how to use a formula field to select data from a table?   I have 2 tables, each of which have tickets that have been processed differently.  One table, XXX, has a key of '735091001', for example.  Table 2, YYY, has the same document w/a key of '7351001'. (The '09' is static in all records of XXX, represents the year.)  I created a formula field that produces a value of '7351001' from the XXX.key.     How can I use this formula field to link to the matching record in the YYY table?
 
Thanks!
 
Hangin' in there, one more day!
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 03 Dec 2009 at 10:51am
so, you are really trying to join 2 tables via a an intermediate formula...
 
Obviously, you can't join them directly. Can you create a view on table xxx and then join to the view to yyy?  Can you get the data from a stored proc, that would also fix this?
 
OR
 
Create a Command Object and put the SQL statement that will return all the columns that you need and the join that works.
 
My order of preference is the 1) stored proc (get all the data you need and be done with it) 2) the view 3) the command object.
 
HTH
IP IP Logged
boss1b
Newbie
Newbie
Avatar

Joined: 03 Dec 2009
Location: United States
Online Status: Offline
Posts: 2
Quote boss1b Replybullet Posted: 03 Dec 2009 at 11:14am
I will give that a try.   Thanks for the help!!!
Hangin' in there, one more day!
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