Crystal report Ver 9
Database AS400
Existing Report
Iam trying to find mean distance between failure
Bus No WO no Mileage Differnce
9717 XXXXX 184049 0
9717 XXXXX 185723 1674
9717 XXXXX 186093 370
9717 189985 3892
9717 189987 2
9717 2637 -187350
9717 4492 1855
9717 4814 322
9717 9940 5126
Summary Count & Avg -2932.60
Differnce is calculated
IF {FM_300L2.FMASET} = PREVIOUS({FM_300L2.FMASET}) THEN
{FM_300L2.FMPMR}- PREVIOUS({FM_300L2.FMPMR})
ELSE
0
Avg Is calculated
whileprintingrecords;
numbervar summiles;
numbervar counter;
if counter > 0 then summiles/counter else 0
My results is coming incorrect because of my data , however i can't change that data as when we change the Hubmeter of a bus ( Odometer) it initialies back to 0.
Any suggestions
Database AS400
Existing Report
Iam trying to find mean distance between failure
Bus No WO no Mileage Differnce
9717 XXXXX 184049 0
9717 XXXXX 185723 1674
9717 XXXXX 186093 370
9717 189985 3892
9717 189987 2
9717 2637 -187350
9717 4492 1855
9717 4814 322
9717 9940 5126
Summary Count & Avg -2932.60
Differnce is calculated
IF {FM_300L2.FMASET} = PREVIOUS({FM_300L2.FMASET}) THEN
{FM_300L2.FMPMR}- PREVIOUS({FM_300L2.FMPMR})
ELSE
0
Avg Is calculated
whileprintingrecords;
numbervar summiles;
numbervar counter;
if counter > 0 then summiles/counter else 0
My results is coming incorrect because of my data , however i can't change that data as when we change the Hubmeter of a bus ( Odometer) it initialies back to 0.
Any suggestions