why I cannot show the totals at oBrw:aCols[8] ?
the code
Code: Select all
@ 1, 1 XBROWSE oBrw SIZE oFld1:aDialogs[1]:nwidth-5,oFld1:aDialogs[1]:nbottom-35 PIXEL OF oFld1:aDialogs[1] ALIAS "PF";
COLUMNS 'PF->codice','PF->Voce','PF->Quantita',;
' PF->Unita','PF->Prezzo','PF->Sconti','PF->Iva','pf->importo' ;
COLSIZES 90,140,50,60,40,80,90,90 ;
HEADERS i18n("Codice"),i18n("Descrizione"), i18n("Quantità"),;
i18n("Unità di misura"),i18n("Prezzo"),i18n("Sconti"),i18n("Iva"),i18n("Importo") ;
PICTURES ,,'@ 9999',,'@ €99,999.99',,'99.99 %','@ €99,999.99' ;
CELL LINES FOOTERS NOBORDER FASTEDIT
FOR i := 1 TO LEN( oBrw:aCols)
oCol := oBrw:aCols[ i ]
* oCol:bLDClickData := {|| }
oCol:oDataFont := oFontGrid
oCol:bOnPostEdit := {|o, v, n| iif( n != VK_ESCAPE, ( DBRLOCK(), FieldPut( o:nCreationOrder, v ), DBUNLOCK() ), ) }
oCol:bOnChange := { || oBrw:MakeTotals(), oBrw:RefreshFooters() }
NEXT
WITH OBJECT oBrw
WITH OBJECT oBrw:aCols[1]
:nBtnBmp := 1
:nEditType := EDIT_BUTTON
:bEditBlock :={||Selezione_prodotti(oBrw)}
END
WITH OBJECT oBrw:aCols[4]
:nEditType := EDIT_LISTBOX
:aEditListTxt:={"pz.","gr","kg","mm" }
END
WITH OBJECT oBrw:aCols[7]
:nBtnBmp := 1
:nEditType := EDIT_LISTBOX
:aEditListTxt:={"20","12","8","4" }
END
WITH OBJECT oBrw:aCols[8]
:bStrData := { || Calcolo_Importo_Riga( PF->QUANTITA,PF->PREZZO,VAL(PF->IVA),PF->SCONTI,oBrw) }
:nTotal := 0
:lTotal := .t.
:nFooterType := AGGR_SUM
:addbmpfile( ".\bitmaps\cassa16.bmp" )
:nDataStrAlign := AL_RIGHT
:cEditPicture := '@ €99,999.99'
:nFootStrAlign := AL_RIGHT
:nFootBmpNo := 1 // Footer BMP
END
END
oBrw:lColDividerComplete := .t.
oBrw:lRecordSelector := .F.
oBrw:lVScroll := .F.
oBrw:lHScroll := .F.
oBrw:nHeaderHeight := 20
oBrw:nRowHeight := 20
oBrw:nStretchCol := STRETCHCOL_WIDEST
oBrw:lFooter:=.t.
oBrw:MakeTotals()
* oBrw:RefreshFooters()
oBrw:CreateFromCode()