Foxtable(狐表)用户栏目专家坐堂 → 怎么实现用CLICK(代码),一键统计出像统计报表格式中的效果?


  共有2335人关注过本帖树形打印复制链接

主题:怎么实现用CLICK(代码),一键统计出像统计报表格式中的效果?

帅哥哟,离线,有人找我吗?
y2287958
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:狐神 帖子:4752 积分:34568 威望:0 精华:0 注册:2008/8/31 22:44:00
  发帖心情 Post By:2018/12/2 16:56:00 [显示全部帖子]

Dim tjb As String = "统计表1"
Dim b As New SQLGroupTableBuilder(tjb,"表A")
b.Groups.AddExp("日期","CDate(日期)")
b.Totals.AddExp("表A_接单量","1")
b.Totals.AddExp("表A_已处理数量","iif(是否解决=true,1,0)")
b.Totals.AddExp("表A_未处理数量","iif(是否解决=true,0,1)")
'b.Build
Dim d As fxDataSource = b.BuildDataSource()
Dim bms As String = "表B|表C|表D"
For Each bm As String In bms.split("|")
    Dim b1 As New SQLGroupTableBuilder(tjb,bm)
    b1.Groups.AddExp("日期","CDate(日期)")
    b1.Totals.AddExp(bm & "_接单量","1")
    b1.Totals.AddExp(bm & "_已处理数量","iif(是否解决=true,1,0)")
    b1.Totals.AddExp(bm & "_未处理数量","iif(是否解决=true,0,1)")
    'b1.Build
    Dim d1 As fxDataSource = b1.BuildDataSource()
    d.Combine("日期",d1,"日期")
Next
d.Show(tjb)
MainTable = Tables(tjb) '打开生成的统计表"

 回到顶部