Page 1 of 1

footer on xbrowse

Posted: Sat Mar 05, 2011 8:10 pm
by Silvio
I want insert the footer on a xbrowse for only two fields on six and seven column and make the total of each, I made :
@ 1, 1 XBROWSE oRLbx OF oFld:aDialogs[5] ;
SIZE 280,60 PIXEL //CLASS TXbrWin7()
Ut_BrwRowConfig7( oRLbx )
oRLbx:lColDividerComplete := .t.
oRLbx:lRecordSelector := .T.
oRLbx:lHScroll := .f.
oRLbx:cAlias := "RB"

aBrowseRb := { { { || RB->CodArt }, i18n("Codice"), 40 },;
{ { || RB->Articolo}, i18n("Articolo"),140 },;
{ { || RB->Misura}, i18n("Unità"), 50 },;
{ { || RB->Quantita}, i18n("Qt."), 30 },;
{ { || RB->Iva}, i18n("Iva"), 30 },;
{ { || RB->Unitario}, i18n("Unitario"), 80 },;
{ { || RB->Totale}, i18n("Totale"), 90 } }

FOR i := 1 TO Len(aBrowseRb)
oCol := oRLbx:AddCol()
oCol:bStrData := aBrowseRb[ i, 1 ]
oCol:cHeader := aBrowseRb[ i, 2 ]
oCol:nWidth := aBrowseRb[ i, 3 ]
NEXT


AEval( oRLbx:aCols, { |o| o:cEditPicture := '99,999.99', ;
o:nFooterType := AGGR_SUM, ;
o:bOnChange := { || oRLbx:MakeTotals(),oRLbx:RefreshFooters() } }, 2 )
oRLbx:aCols[ 7 ]:cFooter := 'Totale'
oRLbx:Totale:cFooter := 'Totale'
oRLbx:nStretchCol :=- 1
oRLbx:MakeTotals()
oRLbx:SetRDD()
oRLbx:CreateFromCode()



but I cannot see any footers !! why ?
where is the error ?

Re: footer on xbrowse

Posted: Sat Mar 05, 2011 8:34 pm
by Romano
oRLbx: lFooter:= .T.

Ciao

Re: footer on xbrowse

Posted: Sat Mar 05, 2011 8:45 pm
by Silvio
NOT RUN

i MADE ALSO
WITH OBJECT oRLbx
WITH OBJECT oRLbx:aCols[ 7 ]
:cEditPicture := '99,999.99'
:lTotal := .t.
:nTotal := 0
:nFooterType := AGGR_TOTAL
END
:MakeTotals()
:nStretchCol :=- 1
:lFooter:= .T.

END


oRLbx:SetRDD()
oRLbx:CreateFromCode()

THE ERROR

Code: Select all

Path and name: C:\work\ERRORI5\GUT\GUT.Exe (32 bits)
   Size: 3,392,512 bytes
   Time from start: 0 hours 0 mins 2 secs 
   Error occurred at: 05-03-2011, 21:45:58
   Error description: Error BASE/1004  Class: 'NIL' has no exported method: EVAL
   Args:
     [   1] = U   
     [   2] = U   

Stack Calls
===========
   Called from:  => EVAL(0)
   Called from: Lib\xbrowse.prg => TXBROWSE:BOOKMARK(2748)
   Called from: Lib\xbrowse.prg => TXBROWSE:MAKETOTALS(6375)
   Called from: source\Pripara.prg => RPEDITA(461)