Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 7761

Calculated column to get the average (dynamic number of fields)

$
0
0

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 ?


Viewing all articles
Browse latest Browse all 7761

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>