Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Sum totals only on Max (Timestamp) Post Reply Post New Topic
Author Message
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Topic: Sum totals only on Max (Timestamp)
     Posted: 26 Jun 2009 at 2:37pm
Hi all!
 
I'm working on this report, And i need to get a distrinct count on person_ids
 
But the count is situational (actually 2 counts possibly more depending on how i write them)
 
Count1 is a count where on the Last visit, (Maximum(Enc_Timestamp))
everything met our goal.
 
Count2 is on the Last visit, 1 or more goals were not met.
 
The person needs to have come in at least 2times in the given time frame.
Does anyone know how i could count this kind of evaluation?
 
I tried to do something like, if goal1 = met and enc_timestamp = Maximum(enc_timestamp) then 1 else 0
 
but it gave me an error because the Maximum isn't a constant value. since the maximum gets re-evaluated for each person.
 
does anyone have any ideas? (besides a SP?)
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 29 Jun 2009 at 7:05am
What I was thinking is in the group header, set a variable to the max timestamp, and use this in the calculation ...  actually missing a parameter in your max statement, it should be something like Maximum({table.timestamp}, {table.person (or however the group is defined})
 
HTH
IP IP Logged
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Posted: 29 Jun 2009 at 9:52am
Thanks for the reply, i'll give it a shot...
and yeah, sorry x.x i was just being lazy... i didn't wanna type it all out that's why the table wasn't included lol SORRY Sleepy
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