Hello,
I want to show 2 totals on Footer
1. counting records where nValue > 0
2. counting records where not empty string
NO value counter only counting valid records on condition 1 and 2 !
regards
Uwe
oBrw:aCols[ 1 ]:nFooterType := AGGR_COUNT
oBrw:aCols[ 1 ]:bSumCondtion := { |v,o| o:Value > 0 }
oBrw:aCols[ 2 ]:nFooterType := AGGR_COUNT
oBrw:aCols[ 2 ]:bSumCondition := { |v,o| !Empty( o:Value ) }
USE CUSTOMER NEW SHARED
SET FILTER TO RECNO() < 11
GO TOP
XBROWSER "CUSTOMER" COLUMNS "STATE", "AGE", "MARRIED", "SALARY" SETUP ( ;
oBrw:lFooter := .t., ;
oBrw:Age:nFooterType := AGGR_COUNT, ;
oBrw:Age:bSumCondition := { |v,o| o:Value % 2 == 1 }, ;
oBrw:State:nFooterType := AGGR_COUNT, ;
oBrw:State:bSumCondition := { |v,o| "A" $ o:Value }, ;
oBrw:Salary:nFooterType := AGGR_SUM, ;
oBrw:Salary:bSumCondition := { || .NOT. FIELD->MARRIED }, ;
oBrw:bRClicked := { |r,c,f,o| o:Age:VarPut( o:Age:Value + 1 ) }, ;
oBrw:MakeTotals() ;
)
I noticed a problem counting < deleted > after a PACK
The deleted value is still visible ( must be reset to 0 )
PACK
oBrw:MakeTotals()
I added
oBrw:aCols[3]:bFooter := { || 0 } after < PACK >
the footer shows 0 now but doesn't count anymore
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 82 guests