Foxtable(狐表)用户栏目专家坐堂 → 求助,谢谢


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

主题:求助,谢谢

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


加好友 发短信
等级:超级版主 帖子:110574 积分:562760 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/11/20 22:09:00 [显示全部帖子]

Dim dtb As New DataTableBuilder("全刀统计")
dtb.AddDef("全刀医师", Gettype(String), 16)
Dim prds As List(of String) = DataTables("患者信息").GetValues("手术类型")
For Each prd As String In prds
    dtb.AddDef(prd & "_全刀台次", Gettype(Integer))
    dtb.AddDef(prd & "_全刀费", Gettype(Double))
Next
Dim dt As DataTable = dtb.Build(True)
For Each cus As String In DataTables("患者信息").GetValues("全刀医师")
    Dim dr As DataRow = dt.AddNew()
    dr("全刀医师") = cus
    For Each prd As String In prds
        dr(prd & "_全刀台次") = DataTables("患者信息").Compute("Count(患者姓名)","全刀医师 = '" & cus & "' And [手术类型] = '" & prd & "'")
        dr(prd & "_全刀费") = DataTables("患者信息").Compute("Sum(全刀手术费)","全刀医师 = '" & cus & "' And [手术类型] = '" & prd & "'")
    Next
Next
Tables("工作量计_Table1").DataSource = dt

 回到顶部