I have build the Cross tab crystal report with Calculated field in it. So for the Calculated field I have below formula
Below formula returns the Average of the field value on the cross tab reports ( number of field are dynamic)
local numbervar usage ;
local numbervar cnt ;
local numbervar i :=CurrentColumnIndex-1 ;
while i >= 0 do
(
usage := usage + ToNumber(gridvalueat(CurrentRowIndex,i,currentsummaryindex));
cnt := cnt + 1;
i := i - 1;
);
usage/cnt ;
My problem is when I see the value on Crystal Report is absolutely perfect but when I schedule the same report in Infoview it's fail to loop and returns Zero either and Error ! What could be the reason of this ?