Crystal Version 9
Database AS400
Existing Report
Bus no Mileage Differnce
PB0001 79243
PB0001 84739 5,496.00
PB0001 90445 5,706.00
PB0001 96393 5,948.00
PB0001 101853 5,460.00
PB0001 107828 5,975.00
PB0001 113590 5,762.00
PB0001 119600 6,010.00
PB0001 125031 5,431.00
PB0001 131078 6,047.00
PB0001 137012 5,934.00
PB0001 142839 5,827.00
PB0001 148605 5,766.00
PB0001 154616 6,011.00
PB0001 160236 5,620.00
PB0001 165870 5,634.00
PB0001 171609 5,739.00
Count XXXX Avg XXXXX
PB0002 108397 0
PB0002 113609 5,212.00
PB0002 119590 5,981.00
PB0002 125218 5,628.00
PB0002 130874 5,656.00
PB0002 136585 5,711.00
PB0002 141935 5,350.00
PB0002 147633 5,698.00
PB0002 153687 6,054.00
PB0002 159670 5,983.00
PB0002 165490 5,820.00
PB0002 171302 5,812.00
PB0002 177473 6,171.00
PB0002 183311 5,838.00
PB0002 188964 5,653.00
PB0002 194636 5,672.00
PB0002 200407 5,771.00
PB0002 205613 5,206.00
Count XX Avg XXXXX
Differnce is calculated by this formula
IF {FM_300L2.FMASET} = PREVIOUS({FM_300L2.FMASET}) THEN
(
if {FM_300L2.FMPMR} >= PREVIOUS({FM_300L2.FMPMR}) then
{FM_300L2.FMPMR}- PREVIOUS({FM_300L2.FMPMR}) else
{FM_300L2.FMPMR}
)
ELSE
0
Avg is calculated :
whileprintingrecords;
numbervar summiles;
numbervar counter;
if counter > 0 then summiles/counter else 0
Avg formula is residing in Group Footer 1
Expected Output
I want to show the average mileage distance in the Report Footer for all the buses . I want to show seperately for each bus(current output) & for the whole Fleet(Expected Output).
I need to show the avergae of all Group Footer . & i have approx total 140 subgroups
Any help / suggestions
Database AS400
Existing Report
Bus no Mileage Differnce
PB0001 79243
PB0001 84739 5,496.00
PB0001 90445 5,706.00
PB0001 96393 5,948.00
PB0001 101853 5,460.00
PB0001 107828 5,975.00
PB0001 113590 5,762.00
PB0001 119600 6,010.00
PB0001 125031 5,431.00
PB0001 131078 6,047.00
PB0001 137012 5,934.00
PB0001 142839 5,827.00
PB0001 148605 5,766.00
PB0001 154616 6,011.00
PB0001 160236 5,620.00
PB0001 165870 5,634.00
PB0001 171609 5,739.00
Count XXXX Avg XXXXX
PB0002 108397 0
PB0002 113609 5,212.00
PB0002 119590 5,981.00
PB0002 125218 5,628.00
PB0002 130874 5,656.00
PB0002 136585 5,711.00
PB0002 141935 5,350.00
PB0002 147633 5,698.00
PB0002 153687 6,054.00
PB0002 159670 5,983.00
PB0002 165490 5,820.00
PB0002 171302 5,812.00
PB0002 177473 6,171.00
PB0002 183311 5,838.00
PB0002 188964 5,653.00
PB0002 194636 5,672.00
PB0002 200407 5,771.00
PB0002 205613 5,206.00
Count XX Avg XXXXX
Differnce is calculated by this formula
IF {FM_300L2.FMASET} = PREVIOUS({FM_300L2.FMASET}) THEN
(
if {FM_300L2.FMPMR} >= PREVIOUS({FM_300L2.FMPMR}) then
{FM_300L2.FMPMR}- PREVIOUS({FM_300L2.FMPMR}) else
{FM_300L2.FMPMR}
)
ELSE
0
Avg is calculated :
whileprintingrecords;
numbervar summiles;
numbervar counter;
if counter > 0 then summiles/counter else 0
Avg formula is residing in Group Footer 1
Expected Output
I want to show the average mileage distance in the Report Footer for all the buses . I want to show seperately for each bus(current output) & for the whole Fleet(Expected Output).
I need to show the avergae of all Group Footer . & i have approx total 140 subgroups
Any help / suggestions