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 ? ..
Rick Lipkin