Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: multiple code descriptions Post Reply Post New Topic
Author Message
bigdummy76
Newbie
Newbie


Joined: 17 Jun 2011
Location: United States
Online Status: Offline
Posts: 15
Quote bigdummy76 Replybullet Topic: multiple code descriptions
     Posted: 23 Aug 2011 at 2:56am
I have a report that displays 4 diagnosis codes. I want to pull a description of the diagnosis code from a separate table for each diagnosis code that is not null.

From the admission                  From the DX code
table                                         table
      DX1   250                         Description Diabetes
      DX2   410                         Description Acute MI
      DX3                                  Description
      DX4                                  Description
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 23 Aug 2011 at 3:00am
join your tables with a left outer join
create a group diagnois code
place the description in the group header
if you are getting null descriptions
go to the record selection
not isnull({field}) or {field}<>' '
sharona
IP IP Logged
bigdummy76
Newbie
Newbie


Joined: 17 Jun 2011
Location: United States
Online Status: Offline
Posts: 15
Quote bigdummy76 Replybullet Posted: 23 Aug 2011 at 3:24am
Guess I didn't describe it correctly.
One table has among other fields, 4 diagnosis code values e.g. 250. The other table has the descriptions of all diagnosis codes e.g. diabetes. Can I link all 4 diagnosis code fields to one instance of the diagnosis code table?
 
pat id   admit date   admit provider  admit dx code 1-4    dx descr
 
The red are from the admit table which is the report. The black from the dx table
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 Aug 2011 at 3:34am
you add the description table to the report 4 times joining each column in the diag table to one description table and make each of these an outer join
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 23 Aug 2011 at 3:41am
Further explanation:
 
When you add a table more than once to a report, Crystal will ask you if you want to "Alias" it.  It will then automatically add "_1", "_2" etc. to the table name.  You then just need to be sure to use the description from the corresponding aliased version of the table based on which field it's linked to.
 
-Dell
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