Print Page | Close Window

Field count changing after adding new field

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=19486
Printed Date: 18 May 2024 at 9:31am


Topic: Field count changing after adding new field
Posted By: brreid
Subject: Field count changing after adding new field
Date 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.


-------------
Thanks for sharing the knowledge



Replies:
Posted By: lockwelle
Date 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


Posted By: brreid
Date Posted: 10 May 2013 at 10:06am
Hi Lockwelle,
thanks so much for your help, it worked!!!

-------------
Thanks for sharing the knowledge


Posted By: joeg1962
Date 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.




Print Page | Close Window