crystalbeginner15
Programmer
I am creating a summary report using CR11.
These are the columns for the report.
I have teo direction and eac direction has three lanes so basically I will get 6 rows of data.
Lane AmTotal AMAVg PMTotal PMAVG PeakAM
I have to calculate AM total which it total volume for
that lane from 1 am- 12PM and similarly PMTotal .I have written a fornula to calculate the AMtotal but its not giving the desired result here is the formula
we have time(hour_nbr) in our database as 0,100,200.......2300(24 hours)
WhilePrintingRecords;
numberVar totalVolume:=0;
numberVar endTime :=1200;
numberVar i= {TKO_HOUR_BY_CLASS_VW.HOUR_NBR};
for i:=0 to endTime step 100 Do
(
totalVolume :=totalVolume +{TKO_HOUR_BY_CLASS_VW.TOTAL_HRLY_VOLUME_NBR}
);
totalVolume
These are the columns for the report.
I have teo direction and eac direction has three lanes so basically I will get 6 rows of data.
Lane AmTotal AMAVg PMTotal PMAVG PeakAM
I have to calculate AM total which it total volume for
that lane from 1 am- 12PM and similarly PMTotal .I have written a fornula to calculate the AMtotal but its not giving the desired result here is the formula
we have time(hour_nbr) in our database as 0,100,200.......2300(24 hours)
WhilePrintingRecords;
numberVar totalVolume:=0;
numberVar endTime :=1200;
numberVar i= {TKO_HOUR_BY_CLASS_VW.HOUR_NBR};
for i:=0 to endTime step 100 Do
(
totalVolume :=totalVolume +{TKO_HOUR_BY_CLASS_VW.TOTAL_HRLY_VOLUME_NBR}
);
totalVolume