no aparece totales en xbrowser

Post Reply
artu01
Posts: 400
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

no aparece totales en xbrowser

Post by artu01 »

Gente:
Estoy leyendo un txt que paso a un arreglo para mostrarlo en un xbrowser pero no consigo que aparezcan los totales podrian decirme que me falta.
la primera fila del txt tiene el nombre de las cabeceras de las cols., esa fila la elimino antes de ponerlo en el xbrowser

Code: Select all | Expand

    cText := StrTran( MemoRead( cfileTXT ), CHR( 10 ), Chr(1) )
    aData := HB_ATokens( cText, Chr(1), .t., .t. )
    
    AEval( aData, { |c,i| c := StrTran( c, Chr(1), CRLF ), aData[ i ] := HB_ATokens( c, "|", .t., .t. ) } )

    aCab:={}
    for i:=5 to 27
        if i<>11
            aadd(aCab, aData[ 1,i])           
        endif    
    next
    adel( aData, 1, .t. )
    aSize( aData, len( aData ) - 1 )

    xbrNumFormat( "A", .t. )

    xbrowser aData COLUMNS 5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27 ;
        SETUP ( oBrw:lFooter:= .t. ,oBrw:aCols[7]:cEditPicture := "@", oBrw:cheaders:=aCab,TotalizarFoot(oBrw),obrw:maketotals()) SHOW RECID    

    Static Function TotalizarFoot(oBrw)
        oBrw:aCols[10]:cDataType :="N"
        oBrw:aCols[10]:nFooterType := AGGR_SUM
        oBrw:aCols[10]:cFooterType := "@E 999,999.99"
        oBrw:aCols[16]:cDataType :="N"
        oBrw:aCols[16]:nFooterType := AGGR_SUM
        oBrw:aCols[16]:cFooterType := "@E 999,999.99"
    return nil    

 
Image
fwh 17.12, harbour 3.2.0, pelles C, bcc7, Ms-Sql
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: no aparece totales en xbrowser

Post by nageswaragunupudi »

Add

Code: Select all | Expand

oBrw:MakeTotals()
at the end before

Code: Select all | Expand

return nil
in the static function TotalizarFoot( oBrw )
Regards

G. N. Rao.
Hyderabad, India
artu01
Posts: 400
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

Re: no aparece totales en xbrowser

Post by artu01 »

Gracias mr. rao por responder pero sigue sin funcionar

Code: Select all | Expand


    xbrowser aData COLUMNS 5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27 ;
        SETUP ( oBrw:lFooter:= .t. ,oBrw:aCols[7]:cEditPicture := "@", oBrw:cheaders:=aCab,TotalizarFoot(oBrw),oBrw:MakeTotals()) SHOW RECID    


Static Function TotalizarFoot(oBrw)
        oBrw:aCols[10]:cDataType :="N"
        oBrw:aCols[10]:nFooterType := AGGR_SUM
        oBrw:aCols[10]:cFooterType := "@E 999,999.99"
        oBrw:aCols[16]:cDataType :="N"
        oBrw:aCols[16]:nFooterType := AGGR_SUM
        oBrw:aCols[16]:cFooterType := "@E 999,999.99"
        oBrw:MakeTotals()
return nil  

 
He subido el xbrowse.prg para su revision
https://www.transfernow.net/dl/20231105orw9nLuV
fwh 17.12, harbour 3.2.0, pelles C, bcc7, Ms-Sql
artu01
Posts: 400
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

Re: no aparece totales en xbrowser

Post by artu01 »

artu01 wrote:Gracias mr. rao por responder pero sigue sin funcionar

Code: Select all | Expand


    xbrowser aData COLUMNS 5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27 ;
        SETUP ( oBrw:lFooter:= .t. ,oBrw:aCols[7]:cEditPicture := "@", oBrw:cheaders:=aCab,TotalizarFoot(oBrw),oBrw:MakeTotals()) SHOW RECID    


Static Function TotalizarFoot(oBrw)
        oBrw:aCols[10]:cDataType :="N"
        oBrw:aCols[10]:nFooterType := AGGR_SUM
        oBrw:aCols[10]:cFooterType := "@E 999,999.99"
        oBrw:aCols[16]:cDataType :="N"
        oBrw:aCols[16]:nFooterType := AGGR_SUM
        oBrw:aCols[16]:cFooterType := "@E 999,999.99"
        oBrw:MakeTotals()
return nil  

 
He subido el xbrowse.prg para su revision
https://www.transfernow.net/dl/20231105orw9nLuV
Mr. rao he formateado el picture para que aparezca dos decimales en la col pero aparece 0 nada mas, porque?
fwh 17.12, harbour 3.2.0, pelles C, bcc7, Ms-Sql
User avatar
Willi Quintana
Posts: 1023
Joined: Sun Oct 09, 2005 10:41 pm
Location: Cusco - Perú
Contact:

Re: no aparece totales en xbrowser

Post by Willi Quintana »

Hola Amigo,
El valor del dato a totalizar tiene que ser numerico....
artu01
Posts: 400
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

Re: no aparece totales en xbrowser

Post by artu01 »

Willi Quintana wrote:Hola Amigo,
El valor del dato a totalizar tiene que ser numerico....
Hola willy gracias x responder
pense que con esta linea lo convertia a numerico la columna

Code: Select all | Expand

oBrw:aCols[10]:cDataType :="N"
 
probare tu sugerencia

Gracias
fwh 17.12, harbour 3.2.0, pelles C, bcc7, Ms-Sql
Post Reply