glthornton
Programmer
Hi,
I'm trying to create a cross-tab report (using Crystal Reports 10) to count the number of times a Primary Care Physician (PCP) has seen their own patients. I have an Appointments table that is setup like this:
Appt Date - Date/Time
Patient ID - Number
Patient Name - Text
GroupDocID - Number
EntityID - Number
Sample data would look like this:
Date PatID PT Name GroupDocID EntityID
11/01/05 123 John Doe 5249 5249
11/01/05 234 Jane Doe 5249 1383
11/02/05 345 Jamie Doe 5249 5249
I have tried using a Formula Field with the following code:
But the above code does not seem to work. What it does do is give me a count of all the lines found.
What I would like to have is a field that is equal to the total count where GroupDocID=EntitityID. And another field that contains the total count where GroupDocID<>EntityID. So in the above example, Seen = 2 and NotSeen=1.
Any ideas/suggestions would greatly be appreciated.
Thanks,
GlThornton
I'm trying to create a cross-tab report (using Crystal Reports 10) to count the number of times a Primary Care Physician (PCP) has seen their own patients. I have an Appointments table that is setup like this:
Appt Date - Date/Time
Patient ID - Number
Patient Name - Text
GroupDocID - Number
EntityID - Number
Sample data would look like this:
Date PatID PT Name GroupDocID EntityID
11/01/05 123 John Doe 5249 5249
11/01/05 234 Jane Doe 5249 1383
11/02/05 345 Jamie Doe 5249 5249
I have tried using a Formula Field with the following code:
Code:
numberVar Seen := 0;
if {Table1.GroupDocID}={Table1.EntityID}
then Seen=Seen+1
But the above code does not seem to work. What it does do is give me a count of all the lines found.
What I would like to have is a field that is equal to the total count where GroupDocID=EntitityID. And another field that contains the total count where GroupDocID<>EntityID. So in the above example, Seen = 2 and NotSeen=1.
Any ideas/suggestions would greatly be appreciated.
Thanks,
GlThornton