XBROWSE Error on :nFooterType == AGGR_MIN
Posted: Thu Jun 08, 2017 6:54 am
In method MakeTotals() is an error with AGGR_MIN or AGGR_MAX. I have marked with //WHY and //ERROR
- Code: Select all Expand view
- if ! Empty( aCols )
for each oCol in aCols
WITH OBJECT oCol
DEFAULT :nFooterType := AGGR_SUM
:nTotal := :nTotalSq := 0.0
:nCount := 0
if :nFooterType == AGGR_MIN .or. :nFooterType == AGGR_MAX //WHY
:nTotal := Nil //WHY
endif //WHY
END
next
nCols := Len( aCols )
uBm := ::BookMark()
Eval( ::bGoTop )
k := 1
::KeyCount()
if ::nLen > 0
do
for each oCol in aCols
WITH OBJECT oCol
nValue := :SumValue()
if nValue != nil
:nCount++
if HB_ISNUMERIC( nValue )
if :nMinVal == nil .or. nValue < :nMinVal
:nMinVal := nValue
endif
if :nMaxVal == nil .or. nValue > :nMaxVal
:nMaxVal := nValue
endif
:nTotal += nValue //ERROR as :nTotal above in code set to nil
:nTotalSQ += ( nValue * nValue )
endif
endif
END
next n
until ( ++k > ::nLen .or. ::Skip( 1 ) < 1 )
endif