Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: formula to retrieve values from 2 different table Post Reply Post New Topic
Author Message
patapatty
Newbie
Newbie
Avatar

Joined: 21 Sep 2011
Location: Italy
Online Status: Offline
Posts: 3
Quote patapatty Replybullet Topic: formula to retrieve values from 2 different table
     Posted: 21 Sep 2011 at 10:34pm
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 22 Sep 2011 at 3:35am
since the tables are available to the reports, or they should be, you could write a formula like:
 
if {tablex.LinkType} = 1 then
  {table1.Description};
if {tablex.LinkType} = 2 then
{table2.Description};
 
you would want to link your lookup tables to the main table using a outer join to the main table based on the code for this formula to work.
 
HTH
IP IP Logged
patapatty
Newbie
Newbie
Avatar

Joined: 21 Sep 2011
Location: Italy
Online Status: Offline
Posts: 3
Quote patapatty Replybullet Posted: 28 Sep 2011 at 11:27pm
Thank's a lot.

Patrizia
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