Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with finding the highest and lowest value in a summary feild

Status
Not open for further replies.

tazibc

Instructor
Oct 5, 2007
66
GB
Pls can some one help I have created a summary feild i.e sum({nse value}) can i find a highest value and a lowest value of this feild.

there is date parameter on the report hence why I have summed this feild, I have tried max and min but this does not give me a cumulative value when I run the report during a week period.

I am using crystal 2008
 
YOu need to use a two Vars Min and max

Place this in report header
@initialise

global numbervar min:=1000000000;
global numbervar max:=0;

Place in group footer
@limits
whileprintingrecords;

global numbervar min;
global numbervar max;

If Sum(valuefield, groupfield) < min then min:=Sum(valuefield, groupfield);

If Sum(valuefield, groupfield) > max then max:=Sum(valuefield, groupfield);

In report footer

@Display Min
whileprintingrecords;

global numbervar min;

Repeat for max

Ian
 
thanks I tried this but it did not work it just returns the global var values we defined 1st which were max 100000000 and min 0

global numbervar min:=1000000000;
global numbervar max:=0;
 
Can you show your formula

You statement above is in conflict


just returns the global var values we defined 1st which were

max 100000000 and min 0

global numbervar min:=1000000000;
global numbervar max:=0;


Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top