Report Design
 Crystal Reports Forum : Crystal Reports .NET 2003 : Report Design
Message Icon Topic: Field count changing after adding new field Post Reply Post New Topic
Author Message
brreid
Newbie
Newbie
Avatar

Joined: 19 Mar 2007
Online Status: Offline
Posts: 11
Quote brreid Replybullet Topic: Field count changing after adding new field
    Posted: 01 May 2013 at 9:53am
Hi
I am trying to run a report on number of patients who had their BMI checked during last month. (250 patients was seen) how many of them had their BMI checked and how many didn't. When I add the first field which is the patient ID it returns 250 patients but when I add the BMI field the patient ID count changes to 175, I would like to see the 250 patient ID with and without the BMI%
what am I doing wrong?
I am pulling the data from three different Excel cheets. and I'm using Crystal X1

Here is what I would like my report to look like:
Patient ID:   BMI%
2222222        25.02
3333333        32.00
4444444
5555555        40.00
But here is what I'm getting:
Patient ID:   BMI%
2222222        25.02
3333333        32.00
5555555        40.00
Thanks for your help.


Edited by brreid - 01 May 2013 at 9:54am
Thanks for sharing the knowledge
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 07 May 2013 at 12:22pm
I would think that you would use a left outer join on the data.
select * from allPatients ap LEFT JOIN bmiPatients bp
on ap.patientID = bp.patientID;

in CR you would use the left outer join as the LINK criteria between the 2 tables.

HTH
IP IP Logged
brreid
Newbie
Newbie
Avatar

Joined: 19 Mar 2007
Online Status: Offline
Posts: 11
Quote brreid Replybullet Posted: 10 May 2013 at 10:06am
Hi Lockwelle,
thanks so much for your help, it worked!!!
Thanks for sharing the knowledge
IP IP Logged
joeg1962
Newbie
Newbie


Joined: 01 Mar 2013
Location: United States
Online Status: Offline
Posts: 35
Quote joeg1962 Replybullet Posted: 15 May 2013 at 7:46am
One way I have done for this, to avoid the left join, is to select on
param in ["BMI","BP Diastolic"]
and then use a variable to capture for BMI obtained
if (__ = "BMI") then 1 else 0

The assumption being that people will always have a BP at a visit - and that count can give you the overall denominator.

IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.