Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Parameter date from two different tables? Post Reply Post New Topic
Author Message
bluelake
Newbie
Newbie
Avatar

Joined: 08 Jul 2010
Online Status: Offline
Posts: 24
Quote bluelake Replybullet Topic: Parameter date from two different tables?
     Posted: 19 Feb 2013 at 5:00am
I'm in a healthcare setting.  I'm writing a report to determine 1)how many patients show for their appointments and 2)how many are seen without an appointment.  This info comes from two separate tables linked by patient ID.  My parameter is a date range.  Ideally, I'd like to use the parameter:
 
({appointment.date} in {?Start Date} to {?End Date}) or
({billing.date} in {?Start Date} to {?End Date})
 
I've tried several different ways but can't get it to work.  Any help appreciated.
 
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Feb 2013 at 5:18am
i am guessing you have a 3rd table of just patient demographic dat.I would use that as the main join and outer join each of your other two tables to it and then your select statement should be ok.
IP IP Logged
bluelake
Newbie
Newbie
Avatar

Joined: 08 Jul 2010
Online Status: Offline
Posts: 24
Quote bluelake Replybullet Posted: 19 Feb 2013 at 6:23am
I tried that.  It returns any date.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Feb 2013 at 6:42am
make sure you set the select expert formula optionto 'use default values for nulls'.
IP IP Logged
bluelake
Newbie
Newbie
Avatar

Joined: 08 Jul 2010
Online Status: Offline
Posts: 24
Quote bluelake Replybullet Posted: 19 Feb 2013 at 6:51am

If the patient shows up in either table, I'm getting the info for both tables.  How do I eliminate the data for the incorrect date?  For example if patient 1 had an appointment on 2/18/13, that info shows, but also info for billing on 1/15/13.  I only want to see info for the date range which is 2/18/13.  Thanks for your help



Edited by bluelake - 19 Feb 2013 at 6:55am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Feb 2013 at 7:59am
you are going to have to explain further about what an 'incorrect date' is.
You seem to have some idea about the relationship between the two tables which is not stated elsewhere in your posts.
perhaps you have an appointment date table with only appointments but the billing table has both appointmente and walk ins? If that is the case is there a join between the appt table and the billing table beyond the client id but using the appt id?
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