Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Count only Max records in Running Total Post Reply Post New Topic
Author Message
thummel1
Senior Member
Senior Member
Avatar

Joined: 27 Apr 2012
Location: United States
Online Status: Offline
Posts: 140
Quote thummel1 Replybullet Topic: Count only Max records in Running Total
     Posted: 17 Apr 2014 at 7:37am
HI, I'm using Crystal 2008. I have a report that has many running totals in it. My running totals are designed to count the total Requisitions, as well determine an average "days to accept" per "specialty" that appears on each requisition.
 
My Dilema: Some requisitions appear multiple times. I only want the ones with the 'Maximum accepted date" factored in the running totals that calculate the average.  (Note: my running totals for "counts" are just fine because I switch those to 'distinct count' and then the max accepted date does not matter for this).
 
What's the best way to do this? Can I do this in the Running Total Calculation, or is this better suited elsewhere in the crystal report?
 
Thanks!


Edited by thummel1 - 17 Apr 2014 at 7:38am
"Press any key to continue. Where's the 'Any' Key?" ~Homer Simpson
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Apr 2014 at 8:29am
if you set a group on the req # and a max value on the group of the accepted date you can use that as your evaluation condition in the running total
IP IP Logged
thummel1
Senior Member
Senior Member
Avatar

Joined: 27 Apr 2012
Location: United States
Online Status: Offline
Posts: 140
Quote thummel1 Replybullet Posted: 17 Apr 2014 at 9:20am
Thank you, and I apologize, I'm not following your suggestion. Can you expand on that a little? I currently have one group (specialty). Am I adding a group (req #), and then inserting a summary somewhere, and then creating a conditional formula in my running total on that summary? If you have a few moments to include a couple steps I'd appreciate it greatly.
"Press any key to continue. Where's the 'Any' Key?" ~Homer Simpson
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Apr 2014 at 9:39am
If you can, group on the the unique identifier for the requistion, likely a table.requistionID field.
you can suppress the GH and GF if desired
Inside that group you can insert a summary as the maximum of the 'accepted date' field.
Now you can use this condition in a running total.
in the evaluation options you can select 'use a formula'
maximum(table.acceptedfield,table.requistionID)=table.acceptedfield
 
This measn that the Running total you create will only run on a field where this condition = true
IP IP Logged
thummel1
Senior Member
Senior Member
Avatar

Joined: 27 Apr 2012
Location: United States
Online Status: Offline
Posts: 140
Quote thummel1 Replybullet Posted: 17 Apr 2014 at 10:07am

I get it and this worked perfectly! Thank you for the additional explanation!

"Press any key to continue. Where's the 'Any' Key?" ~Homer Simpson
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