Hi Guys,
I'm doing a xbrowse of a rowset and I need to add cols at runtime. Could someone help me ?
ADD oCol TO oLbx AT 2 DATA {|x| x := If(oRsRepair:Eof, ,_ChkCust(oRsRepair:Fields("lname"):Value,;
oRsRepair:Fields("fname"):Value)) } HEADER "Customer Name" size 150 ;
SORT "LNAME"
.
.
.
//-------------------
Static Func _ChkCust( cLast,cFirst )
Local cName
If cFirst = " " .or. empty( cFirst)
cName := substr(alltrim( cLast )+space(40),1,40)
Else
cName := substr(alltrim( cLast )+", "+alltrim(cFirst)+space(40),1,40)
Endif
Return(cName)
oCol := oRs:XbrAddColumn( oBrw, cFieldName, [cHeader] )
WITH OBJECT oCol
// other clauses
END
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot], nageswaragunupudi and 92 guests