no aparece totales en xbrowser

no aparece totales en xbrowser

Postby artu01 » Sat Nov 04, 2023 11:28 pm

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 view

    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
artu01
 
Posts: 400
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

Re: no aparece totales en xbrowser

Postby nageswaragunupudi » Sun Nov 05, 2023 6:55 am

Add
Code: Select all  Expand view
oBrw:MakeTotals()

at the end before
Code: Select all  Expand view
return nil
in the static function TotalizarFoot( oBrw )
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: no aparece totales en xbrowser

Postby artu01 » Sun Nov 05, 2023 9:58 pm

Gracias mr. rao por responder pero sigue sin funcionar
Code: Select all  Expand view


    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

Postby artu01 » Sun Nov 05, 2023 10:14 pm

artu01 wrote:Gracias mr. rao por responder pero sigue sin funcionar
Code: Select all  Expand view


    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
artu01
 
Posts: 400
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

Re: no aparece totales en xbrowser

Postby Willi Quintana » Mon Nov 06, 2023 12:00 am

Hola Amigo,
El valor del dato a totalizar tiene que ser numerico....
User avatar
Willi Quintana
 
Posts: 1019
Joined: Sun Oct 09, 2005 10:41 pm
Location: Cusco - Perú

Re: no aparece totales en xbrowser

Postby artu01 » Fri Nov 10, 2023 2:57 pm

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 view

oBrw:aCols[10]:cDataType :="N"
 

probare tu sugerencia

Gracias
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


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 36 guests