Estimados;
Tengo el siguiente footer:
El problema es el siguiente: La columna Monto (en rojo) tiene valores positivos en la BD.
Lo que necesito es mostrarla en negativo y usando el picture "@( 99,999.99"
Alguna pista?
gracias
:bFooter:= {|| Trans( -Val( ::oLstDeuda:Cobrado:cFooter ), "@E( 99,999.99" ) }
MarioG wrote:Victor; gracias pr responder
No escribí bien la pregunta
El valor, que llamas nValor, sería el resultado :MakeTotals().
Yo probé, sobre la columna en custión, haciendo:
- Code: Select all Expand view RUN
:bFooter:= {|| Trans( -Val( ::oLstDeuda:Cobrado:cFooter ), "@E( 99,999.99" ) }
y me devuelve 0.
O sea la consulta sería: como obtengo el valor de dicha columna?
MarioG wrote:José Luis;
lo que quiero es, saber el valor (para el ejemplo 173,81). Como lo obtengo??.
WITH OBJECT ::oLstDeuda
...
:lFooter = TRUE
:bChange := {|| ::oLstDeuda:MakeTotals(), ;
::oLstDeuda:Monto:cFooter:= Trans( -::oLstDeuda:Monto:nTotal, "@E( 99,999.99" ), ;
::oLstDeuda:Refresh() }
:bGotFocus:= {|| h0["CabVentas"]:SetFocus() }
END
:bChange := {|| ::oLstDeuda:MakeTotals(), ;
::oLstDeuda:Monto:cFooter:= Trans( -::oLstDeuda:Monto:nTotal, "@E( 99,999.99" ), ::oLstDeuda:Refresh() }
:bChange := {|| ::oLstDeuda:MakeTotals(), ;
::oLstDeuda:Monto:cFooter:= Trans( (-1*::oLstDeuda:Monto:nTotal), "@E( 99,999.99" ), ::oLstDeuda:Refresh() }
:bChange := {|| ::oLstDeuda:MakeTotals(), ;
::oLstDeuda:Monto:cFooter:= Trans( -::oLstDeuda:Monto:nTotal, "@E( 99,999.99" ), ;
::oLstDeuda:RefreshFooter() }
:bChange := {|| ::oLstDeuda:MakeTotals(), ;
::oLstDeuda:Monto:cFooter:= Trans( -::oLstDeuda:Monto:nTotal, "@E( 99,999.99" ), ;
::oLstDeuda:Monto:RefreshFooter() }
WITH OBJECT oBrw
:aCols[ 03 ]:cFooter := "Total C$:"
:aCols[ 06 ]:cFooterPicture := "(999,999.99)" //ejemplo
:aCols[ 06 ]:nFooterType := AGGR_SUM
END
EXTEND CLASS TXBRWCOLUMN WITH DATA cFooterPicture
OVERRIDE METHOD FooterStr IN CLASS TXBRWCOLUMN WITH KFooterStr
FUNCTION KFooterStr()
LOCAL Self := HB_QSelf()
local cFooter := "", cType
if ::bFooter != nil
cFooter := Eval( ::bFooter, Self )
DEFAULT cFooter := ""
elseif ::nTotal != nil .or. ! Empty( ::nFooterType )
DEFAULT ::nFooterType := AGGR_SUM, ::nTotal := 0.0
if ::nFooterType >= AGGR_STD
if ::nCount > 0
cFooter := ::nTotalSq - ( ::nTotal * ::nTotal / ::nCount )
cFooter /= ::nCount - If( ::nFooterType == AGGR_STDEVP, 0, 1 )
cFooter ^= 0.5
else
cFooter := 0
endif
elseif ::nFooterType == AGGR_AVG
cFooter := If( ::nCount > 0, ::nTotal / ::nCount, 0 )
elseif ::nFooterType == AGGR_COUNT
cFooter := ::nCount
else
cFooter := ::nTotal
endif
elseif ::cFooter != nil
cFooter := ::cFooter
endif
cType := ValType( cFooter )
if cType != 'C'
if cType == ::cDataType .and. ::cEditPicture != nil
cFooter := cValToStr( cFooter, IIf( ::cFooterPicture==NIL, ::cEditPicture, ::cFooterPicture ),, ;
IfNil( ::lDisplayZeros, ::oBrw:lDisplayZeros ) )
else
cFooter := cValToChar( cFooter )
endif
endif
return cFooter
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: D.Fernandez and 20 guests