• 主页
• API 调用
• 基础类
• 控件与界面
• 数据库相关
• DataWindow
• 项目管理
• Web 应用
• 脚本语言

# 在线等待+100分 关于排序的问题

solo2k 2003-12-26 10:58:58
PB6.5里对分组汇总的数据怎么实现排序？？？？？

...全文
68 点赞 收藏 11

11 条回复

jdsnhan 2003-12-31
dw_1.SetRedraw(false)
dw_1.Setsort("字段名 A for group 组号")//升序A，降序D
dw_1.Sort()
dw_1.GroupCalc()
dw_1.SetRedraw(true)

solo2k 2003-12-30

banalman 2003-12-26

dw_1.setsort("字段名 A for group 组号")//升序A，降序D
dw_1.sort()

mylovehyy 2003-12-26

feixianzhi 2003-12-26

workhand 2003-12-26

dw_1.setsort("字段名 A for group 组号")//升序A，降序D
dw_1.sort()

ld2099 2003-12-26
//点击列头排序
string ls_CurObj, ls_CurCol
integer li_LinePos

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

eminena 2003-12-26

chrisfy 2003-12-26
dw_1.setsort("字段名 A for group 组号")//升序A，降序D
dw_1.sort()

mittee 2003-12-26

intuition444 2003-12-26

PowerBuilder

808

PowerBuilder 相关问题讨论