Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Min/Max value on Summary Total Post Reply Post New Topic
Author Message
mproper
Newbie
Newbie


Joined: 27 Oct 2011
Online Status: Offline
Posts: 1
Quote mproper Replybullet Topic: Min/Max value on Summary Total
    Posted: 27 Oct 2011 at 8:17am
Having a hard time figuring this out. Relatively new to Crystal, and this is a bit beyond me.

I'm creating a report where I have offenders grouped under the officers that are assigned to them. I have a summary field on each group so I know how many offenders are assigned to each officer.

I need to figure out the LOWEST number of offenders that are assigned to any one officer, as well as the HIGHEST.

In other words, I need to kick out: "Lowest number of offenders assigned to any one officer is ## and the highest number of offenders assigned to any one officer is ##"

I took my summary totals, and tried to create a formula that did a MINIMUM or MAXIMUM on the summary field but I get an error about the field not being able to be summarized.

Using CR 2008, but will need to do the same thing in 8.5 so I can roll out the report to various organizations that need it.

Edited by mproper - 27 Oct 2011 at 8:19am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Oct 2011 at 12:21pm

not my forte but you can use variable formulas based on group summary data. These assume you are doing a count of 'offender' per 'officer' group. These also need to be displayed in the report footer.

//highest number
numbervar highestvalue;
highestvalue := if highestvalue > Count ({table.offender}, {table.officer}) then highestvalue else Count ({table.offender}, {table.officer})
 
//lowest number
numbervar lowestvalue;
lowestvalue:= if lowestvalue <>0 and lowestvalue< Count ({table.offender}, {table.officer}) then lowestvalue else Count ({table.offender}, {table.officer})
 
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.000 seconds.