Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Crystal Can't Count! Post Reply Post New Topic
Author Message
tonkamedic
Newbie
Newbie
Avatar

Joined: 30 Nov 2011
Location: United States
Online Status: Offline
Posts: 5
Quote tonkamedic Replybullet Topic: Crystal Can't Count!
     Posted: 30 Nov 2011 at 4:54am
I am working on a report to show how many patients were seen in a particular area. I setup a formula that tells me if a time stamp for visit was is entered.

if isnull({ORDER_PROC.PROC_TIME}) then 0 else 1

I then set a count summary at the report footer. My report shows that 1 of 2 patients have been seen. But the count at the report footer shows "2,240" I have tried moving the count summary to different areas of the report and I get the same value. I even tried to manually calculate this with a formula and display it in the report footer too. I get the same value. Still no luck.

The system I am programming with is populating from a database created by Epic Clarity.

Any ideas as to why it does this?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Nov 2011 at 8:04am
can you explain your report structure a little more and how you did your summary(s)?
IP IP Logged
tonkamedic
Newbie
Newbie
Avatar

Joined: 30 Nov 2011
Location: United States
Online Status: Offline
Posts: 5
Quote tonkamedic Replybullet Posted: 30 Nov 2011 at 10:00am
This report collects patients that come through an outpatient facility. I need it to calculate which patients have a certain test completed during their visit. I am attempting to have the test check to see if there is a begin time for the test. If there is a time present then it needs to add one to the overall number for the report. It does not need to be specific to each patient showing up on the report, but just an overall report level.

Edited by tonkamedic - 30 Nov 2011 at 10:00am
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 30 Nov 2011 at 10:41am
try sum function instead of count function
or change your formula to
if not(isnull({ORDER_PROC.PROC_TIME})) then 1
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 01 Dec 2011 at 2:33am
just to be sure, because sometimes things aren't what we think...
 
are there records in the table that did not have that test, and so do not have a time stamp?
 
are the records filtered so that only people having the test are included, or at least the counting part?
 
To debug, you could display the formula in the detail section of the report and then you could see where CR is assigning a 1, and if the logic is correct.
 
It can be hard to debug black boxes as we can't see what / CR is doing something that we think is wrong...but is what we told it to do.
 
As hilfy's tag line reads, "Computers only do what you tell them, not what you thought you told them."
 
HTH
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