xBrowse MakeTotals()

xBrowse MakeTotals()

Postby Rick Lipkin » Tue Nov 27, 2018 11:45 pm

Rao

I have a couple of questions for you .. here is my MakeTotals() and xBrowse Header code ..

Code: Select all  Expand view  RUN

 REDEFINE xBROWSE oLbxC             ;
         RECORDSET oRsQuota           ;
         COLUMNS "PERSNO",            ;
                 "EMPLOYEE",          ;
                 "QUOTA",             ;
                 "ENTITLEMENT",       ;
                 "USED",              ;
                 "REMONKEYDATE"       ;
         COLSIZES 122,190,120,120,120,120 ;
         HEADERS "PersNo",            ;
                 "Employee Name",     ;
                 "Quota",             ;
                 "Entitlement",       ;
                 "Used",              ;
                 "RemainderOnKeyDt" ;
         ID 133 of oGrps  ;
         AUTOCOLS FOOTERS LINES CELL

   oLbxC:nMarqueeStyle := MARQSTYLE_HIGHLROW
   oLbxC:lRecordSelector := .f.

   // add columns
   ADD oCol2 to oLbxC AT 7 DATA {|x| x := If(oRsQuota:Eof, ,_ChkHours(oRsQuota:Fields("REMONKEYDATE"):Value))};
                    HEADER "TotalDaysRemaining" size 120

   oLbxC:SetGroupHeader( 'Hours', 4, 6 )

   // column orientation
   oLbxC:aCols[7]:nDataStrAlign := AL_RIGHT  // days remaining
   oLbxC:aCols[7]:nHeadStrAlign := AL_CENTER
   oLbxC:aCols[6]:nHeadStrAlign := AL_CENTER

   oLbxC:lFooter   := .t.
   oCol1           := oLbxC:aCols[ 1 ]
   oCol1:bFooter   := { || Ltrim( Str( oLbxC:KeyNo() ) ) + " / " + LTrim( Str( oLbxC:KeyCount() ) ) }
   oLbxC:bChange   := { || oCol1:RefreshFooter() }

   WITH OBJECT oLbxC
        :Entitlement:nFooterType         := AGGR_SUM
        :Used:nFooterType                := AGGR_SUM
        :RemainderOnKeyDt:nFooterType    := AGGR_SUM
        :TotalDaysRemaining:nFooterType  := AGGR_SUM
        :MakeTotals()
   END
 


Lets take the header RemainderOnKeyDt .. If I define the header as :
:Remainder On KeyDt:nFooterType := AGGR_SUM

The compiler errors .. I can not leave any spaces .. is there a work around that would let me use spaces in then xBrowse Column header ? .. Also I have created a 7th column that just returns a numeric value .. The bottom MakeTotal() is skewed off to the left .. is there a way to align the MakeTotal footer to align to the right ? ..

Image

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: xBrowse MakeTotals()

Postby nageswaragunupudi » Tue Nov 27, 2018 11:58 pm

You can have the header as "Remainder On KeyDt" and still use "oBrw:RemainderOnKeyDt:nFooterType := AGGR_SUM"
Regards

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

Re: xBrowse MakeTotals()

Postby Rick Lipkin » Wed Nov 28, 2018 3:40 pm

Rao

Thanks .. how do I shift the last column TotalDaysRemaining maktotals() footer to the right ?

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: xBrowse MakeTotals()

Postby nageswaragunupudi » Wed Nov 28, 2018 4:05 pm

nFootStrAlign
Regards

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

Re: xBrowse MakeTotals()

Postby Rick Lipkin » Wed Nov 28, 2018 4:21 pm

Rao

Thanks .. appreciate your Help!

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], MGA, Rick Lipkin and 60 guests