搞得这么复杂干什么,直接用分组统计:
http://www.foxtable.com/help/topics/0160.htm
不想每次设置的话,可以将设置保存起来:
http://www.foxtable.com/help/topics/0164.htm
也可以在菜单中单独做个按钮:
http://www.foxtable.com/help/topics/0677.htm