以下是引用wjp456789在2012-11-11 01:00:23的发言:
sele 经手人 as 家庭成员,sum(折取) as 折取,sum(转存) as 转存,………… from 表 group 经手人
省略号代表你要显示的字段。参照家庭成员,折取,和转存的表达式求和。
老弟:你好!上次我在你的基础上用得筛选进行了改进,只要先选择时间范围,经手人,类别后左击查找就能在GRID中直接显示符合条件的记录.程序如下:
a1=ctod()
a2=ctod()
b=
DO CASE
CASE thisform.optiongroup2.value=2
c=thisform.optiongroup2.option2.caption
CASE thisform.optiongroup2.value=3
c=thisform.optiongroup2.option3.caption
CASE thisform.optiongroup2.value=4
c=thisform.optiongroup2.option4.caption
CASE thisform.optiongroup2.value=5
c=thisform.optiongroup2.option5.caption
CASE thisform.optiongroup2.value=6
c=thisform.optiongroup2.option6.caption
CASE thisform.optiongroup2.value=7
c=thisform.optiongroup2.option7.caption
CASE thisform.optiongroup2.value=8
c=thisform.optiongroup2.option8.caption
CASE thisform.optiongroup2.value=9
c=thisform.optiongroup2.option9.caption
CASE thisform.optiongroup2.value=10
c=thisform.optiongroup2.option10.caption
CASE thisform.optiongroup2.value=11
c=thisform.optiongroup2.option11.caption
CASE thisform.optiongroup2.value=12
c=thisform.optiongroup2.option12.caption
CASE thisform.optiongroup2.value=13
c=thisform.optiongroup2.option13.caption
CASE thisform.optiongroup2.value=14
c=thisform.optiongroup2.option14.caption
CASE thisform.optiongroup2.value=15
c=thisform.optiongroup2.option15.caption
CASE thisform.optiongroup2.value=16
c=thisform.optiongroup2.option16.caption
CASE thisform.optiongroup2.value=17
c=thisform.optiongroup2.option17.caption
CASE thisform.optiongroup2.value=18
c=thisform.optiongroup2.option18.caption
CASE thisform.optiongroup2.value=19
c=thisform.optiongroup2.option19.caption
ENDCASE
SELECT zjtzb
SET FILTER TO
SET FILTER TO rq>=a1 and rq<=a2 and jsr=b and xlb=c
GO TOP
THISFORM.Refresh
go top
thisform.refresh