Download Manifold Script / .NET / XML Examples

Transcript
Else
Column_Width = Len(Column_Names(Col_Index)) + 1
End If
Else
Column_Width = 0
End If
Set Col = Cols(Col_Index)
Add_Quotes = FALSE
If Quotes AND ( Col.Type = ColumnTypeAChar OR _
Col.Type = ColumnTypeAText OR _
Col.Type = ColumnTypeWChar OR _
Col.Type = ColumnTypeWText _
) Then Add_Quotes = TRUE
For Each Rcrd in Rcrds
If Add_Quotes Then
W = Len(cStr(Rcrd.Data(Column_Names(Col_Index)))) + 3
Else
W = Len(cStr(Rcrd.Data(Column_Names(Col_Index)))) + 1
End If
If W > Column_Width Then Column_Width = W
Next
Column_Widths(Col_Index) = Column_Width
Next
Else
Fixed_Width = False
End If
' Insert the column names into the first line if requested.
If Include_ColumnNames Then
For Col_Index = 0 to Last_Col_Index
If Quotes Then
Str = """" & Column_Names(Col_Index) & """"
Else
Str = Column_Names(Col_Index)
End If
If Fixed_Width Then
' Padding = String( Column_Widths(Col_Index) - Len(Str), 32 )
Padding = Space( Column_Widths(Col_Index) - Len(Str))
Str = Str & Padding
Report_Comp.AddText (Str)
Else
If Col_Index = Last_Col_Index Then
Report_Comp.AddText (Str)
Else
Report_Comp.AddText (Str & Separator)
End If
End If
Next
233