If ib_AutoSort Then //if ib_AutoSort is Ture,then SetSort.
ls_CurObj = Lower(String(dwo.Name))
li_LinePos = Integer(This.Describe(ls_CurObj + ".X"))+ (Integer(This.Describe(ls_CurObj + ".Width")) - 20)
If Row = 0 AND This.Describe(ls_CurObj + ".Text") <> "!" AND &
This.Describe(ls_CurObj + ".Band") = "header" And Right(ls_CurObj,2) = "_t" Then // Valid header object?
ls_CurCol = Left(ls_CurObj,Len(ls_CurObj) - 2)
If is_OrderCol <> ls_CurCol Then
is_OrderCol = Left(ls_CurObj,Len(ls_CurObj) - 2)
of_asc(li_linePos)
is_SortType = "A"
This.SetSort(is_OrderCol + " " + is_SortType)
This.Sort()
Else
If is_SortType = "A" Then
li_LinePos -= 20
of_des(li_LinePos)
is_SortType = "D"
Else
of_asc(li_LinePos)
is_SortType = "A"
End If
This.SetSort(is_OrderCol + " " + is_SortType)
This.Sort()
End If
End If
End If