xbrowse maketotals fwh 10.1

xbrowse maketotals fwh 10.1

Postby Richard Chidiak » Thu Mar 25, 2010 10:21 am

Hello

I can't have footers drawn on a browse where i need to total just the last column (6)

I am surely missing something,

Thanks for the help

Code: Select all  Expand view

@ 155,5 XBROWSE oBrw OF ownd ;
      SIZE ownd:nwidth - 10,ownd:nHeight - 270 PIXEL ;
      FIELDS DET->PID,DET01(OBRW),DET->LUNITE,DET->NUNITES,DET->PUHT,DET->VALHT ;
      PICTURES nil, nil ,nil, "@Z 999 999.999", "@Z 999 999 999 999.99","@Z 999 999 999 999.99" ;
      HEADERS "Code", "Désignation","  ","Quantité","Px Unitaire","Px Total";
      FIELDSIZES 80,400,50,100,100,100 ;
      FONT AFONT ;
      FOOTERS  ;
      ALIAS "DET"

oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW
oBrw:lColDividerComplete := .t.
oBrw:nColDividerStyle := LINESTYLE_LIGHTGRAY
oBrw:nRowDividerStyle := LINESTYLE_LIGHTGRAY
//oBrw:nStretchCol := STRETCHCOL_LAST

obrw:obrush  := obrush1
OBRW:bClrStd := {|| { CLR_BLUE, CLR_WHITE } }

oBrw:aCols[6]:lTotal := .t.
oBrw:MakeTotals()
oBrw:CreateFromCODE()

OBRW:SETFOCUS()

 
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: xbrowse maketotals fwh 10.1

Postby nageswaragunupudi » Thu Mar 25, 2010 10:42 am

oBrw:aCols[6]:lTotal := .t.
oBrw:aCols[6]:nTotal := 0 // this line also is required

oBrw:MakeTotals()
Regards

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

Re: xbrowse maketotals fwh 10.1

Postby James Bott » Mon Mar 29, 2010 5:56 pm

Code: Select all  Expand view
oBrw:aCols[6]:nTotal := 0


It seems like that should be part of the TXBrowse code.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: xbrowse maketotals fwh 10.1

Postby nageswaragunupudi » Tue Mar 30, 2010 1:14 am

James Bott wrote:
Code: Select all  Expand view
oBrw:aCols[6]:nTotal := 0


It seems like that should be part of the TXBrowse code.

James


MakeTotals() method totals only those columns where oCol:nTotal is numeric and displays oCol:nTotal in the footer using the oCol:cEditPicture.

oCol:lTotal is used to total in export to Excel and in Report method.
Regards

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

Re: xbrowse maketotals fwh 10.1

Postby James Bott » Tue Mar 30, 2010 1:30 am

Rao,

Thanks for clarifying that.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: xbrowse maketotals fwh 10.1

Postby nageswaragunupudi » Tue Mar 30, 2010 1:45 am

Additional Info:
From version 10.2 onwards it is enough to assign
oCol:nFooterType := AGGR_TOTAL // or AGGR_SUM.
It is not necessary to assign values for oCol:lTotal and oCol:nTotal.

Other available options are :
oCol:nFooterType := AGGR_MAX or AGGR_MIN or AGGR_COUNT or AGGR_AVERAGE/AGGR_AVG or AGGR_STD/AGGR_STDEV or AGGR_STDEVP.

XBrowses computations are compatible with Excel's functions with the same names.

In all these cases, like in all earlier versions, if the value of the column is edited inline, the footer's value is automatically updated with the change and footer refreshed.
Regards

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Marc Venken and 80 guests