error al totalizar columna xbrowse

error al totalizar columna xbrowse

Postby artu01 » Fri Feb 03, 2017 11:52 pm

Hola foro
estoy tratando de totalizar una columna en xbrowse pero me tira este error:
Image

AGGR_SUM , totaliza la columna por si sola?
Code: Select all  Expand view

   XBrNumFormat( 'A', .t. )
   REDEFINE XBROWSE oBrwDet                                               ;        //19
      FIELDS DETPARTET->articu                                            ;
            ,Articulo->DesG                                               ;
            ,DETPARTET->Cantid                                            ;
            ,articulo->Cap*DETPARTET->Cantid                              ;
            ,DETPARTET->Precio                                            ;
            ,round((articulo->Cap*DETPARTET->Cantid)*DETPARTET->Precio,2) ;
      FIELDSIZES 65,200,70,70,70,70                    ;
      HEADERS "Codigo"                                 ;
             ,"Descripción"                            ;
             ,"Cant."                                  ;
             ,"Metros"                                 ;
             ,"Precio"                                 ;
             ,"Importe"                                ;            
      ID 4001 OF oDlgDet                               ;
      LINES CELL NOBORDER UPDATE FOOTERS
     
      WITH OBJECT oBrwDet
          :aCols[3]:nFooterType        := AGGR_SUM
          :MakeTotals()
      END

 
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: error al totalizar columna xbrowse

Postby joseluisysturiz » Sat Feb 04, 2017 12:59 am

Me funciona bien asi....saludos... :shock:

WITH OBJECT aBrw[9] // COLUMNAS
:aCols[2]:cFooter := "Total --->"
***
:aCols[3]:nTotal := 0 // PARA TOTALIZAR COL.(MakeTotals)
END
Dios no está muerto...

Gracias a mi Dios ante todo!
User avatar
joseluisysturiz
 
Posts: 2064
Joined: Fri Jan 06, 2006 9:28 pm
Location: Guatire - Caracas - Venezuela

Re: error al totalizar columna xbrowse

Postby nageswaragunupudi » Sat Feb 04, 2017 8:51 am

IMPORTANT:

Please add
Code: Select all  Expand view

ALIAS "articulo"
 

to the REDEFINE command.
It is important that Browse knows the alias name when you define xbrowse.

If you are calling oBrw:SetRDD() later, please do not call it.
Regards

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

Re: error al totalizar columna xbrowse

Postby artu01 » Mon Feb 06, 2017 10:01 pm

Thank Mr. Rao and JoseLuis
Now run Ok
this is my code
Code: Select all  Expand view

   XBrNumFormat( 'A', .t. )
   REDEFINE XBROWSE oBrwDet  ;
      ALIAS "DETPARTET"       ;
      COLUMNS "ARTICU","ARTICULO->DESG","CANTID","ARTICULO->CAP*CANTID","PRECIO","round((articulo->Cap*Cantid)*Precio,2)";
      FIELDSIZES 65,200,70,70,70,70                    ;
      HEADERS "Codigo"                                 ;
             ,"Descripción"                            ;
             ,"Cant."                                  ;
             ,"Metros"                                 ;
             ,"Precio"                                 ;
             ,"Importe"                                ;            
      ID 4001 OF oDlgDet                               ;
      LINES CELL NOBORDER UPDATE FOOTERS
     
      WITH OBJECT oBrwDet
        :aCols[2]:cFooter:="Total -->"      
          :aCols[3]:nTotal:=0
        :aCols[4]:nTotal:=0
        :aCols[6]:nTotal:=0        
          :MakeTotals()
      END

 
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: error al totalizar columna xbrowse

Postby nageswaragunupudi » Tue Feb 07, 2017 8:52 am

This is better
Code: Select all  Expand view
    WITH OBJECT oBrwDet
        :aCols[2]:cFooter:="Total -->"      
        :aCols[3]::nFooterType := AGGR_SUM
        :aCols[4]::nFooterType := AGGR_SUM
        :aCols[6]::nFooterType := AGGR_SUM        
        :MakeTotals()
      END
 
Regards

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

Re: error al totalizar columna xbrowse

Postby artu01 » Tue Feb 07, 2017 5:38 pm

run perfect!

Thank you Mr. Rao
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: Google [Bot] and 33 guests