I want to display the minimum and maximum values per page. I know there is the Minimum and Maximum Summary function built in, but that only works for the whole report. Thanks in advance for any advice.
You will have to set up variables to hold the max and min values and then use a detail line formula to compare the current value with the max and min values so far. Then print them in the footer using more formula fields.
To do this:
Create a formula field in the page header which defines the variables and sets then to extreme values.(eg. set the max to -999999 and the min to 999999.
This formula goes in the page header and can be suppressed.
The detail line formula must compare the currenyt value of the fiel with the max value and the min value. If it's graeter than the max then set the max to the current value; if it's less than the min then set the min to the current value.
In the page footer, create two formulas; one to show the current value of the max variable and the other to show the current value of the min variable.
I think you will have to use WhilePrintingRecords at the start of each formula.
//{@reset} to be placed in the page header:
whileprintingrecords;
numbervar min := 0;
numbervar max := 0;
numbervar counter := 0;
//{@minmaxaccum} to be placed in the detail section:
whileprintingrecords;
numbervar min;
numbervar max;
numbervar counter := counter + 1;
if counter = 1 then min := {table.amt} else
if {table.amt} < min then min := {table.amt} else
min := min;
if counter = 1 then max := {table.amt} else
if {table.amt} > max then max := {table.amt} else
max := max;
//{@displaymin} to be placed in the page footer:
whileprintingrecords;
numbervar min;
//{@displaymax} to be placed in the page footer:
whileprintingrecords;
numbervar max;
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.