lcStr=strtran(m.lcStr,",",chr(13)) lnItems=alines(laItems,m.lcStr)In Vfp 7.0 there is a new parameter added to ALINES function.
>Use "tablesamp" in 0 shared >With ThisForm.GridGeneral1 > .RecordSource = "tablesamp" > .Refresh() > .LayoutRefresh("cProj,The Project") >EndWith >>
>Parameters nLType , cCol1 , cCol2 , cCol3 , cCol4 , cCol5 > >This.ColumnCount = 0 >If VarType(cCol1) ="C" > nItemCount = Occurs( "," , cCol1 ) + 1 > Dimension arItems[nItemCount,1] > aItems = "" > nLastPos = 1 > For nCnt = 1 to nItemCount > If nCnt < nItemCount > arItems[nCnt,1] = SubStr( cCol1 , nLastPos , ; > ( At ( "," , cCol1 , nCnt) -1 ) - nLastPos +1 ) > Else > arItems[nCnt,1] = SubStr( cCol1 , nLastPos , ; > ( Len ( cCol1 ) - nLastPos ) + 1) > EndIf > nLastPos = At( "," , cCol1 , nCnt ) +1 > EndFor >EndIf >This.ColumnCount = This.ColumnCount + 1 >With This.Columns(This.ColumnCount) > .Width = 50 > .Header1.Caption = arItems[2] > .Header1.FontName = "Tahoma" > .Header1.FontBold = .t. > .Header1.FontSize = 8 >EndWith >With This.Columns(This.ColumnCount).Text1 > .ControlSource = arItems[1] > .FontName = "Tahoma" > .FontBold = .f. > .FontSize = 8 > .Width = 50 >EndWith > >? Chr(9) +Chr(9) +Chr(9) + arItems[1] >? Chr(9) +Chr(9) +Chr(9) + arItems[2] >>