Foxtable(狐表)用户栏目专家坐堂 → [求助]统计


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

主题:[求助]统计

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


加好友 发短信
等级:五尾狐 帖子:1014 积分:6757 威望:0 精华:0 注册:2014/2/12 20:14:00
[求助]统计  发帖心情 Post By:2023/10/26 19:02:00 [显示全部帖子]

老师,下面代码只统计到9月份
If e.DataCol.Name = "项目ID" OrElse e.DataCol.Name = "项目" Then
    For i As Integer = 1 To 12
        Dim Filter As String = e.DataRow("项目") & "_ID = '" & e.DataRow("项目ID") & "' and 月=" & i
        e.DataRow("M" & i) = DataTables("数据汇总").Compute("Sum(" & e.DataRow("项目") & "_应付)", Filter)
    Next
End If


If e.DataCol.Name Like "*房_ID" Then
    Dim pr As DataRow
    pr = DataTables("水电气统计").Find("项目 = '" & e.DataCol.Name.split("_")(0) & "' and 项目ID='" & e.newvalue & "'")
    If pr IsNot Nothing Then
        DataTables("水电气统计").DataCols("项目ID").RaiseDataColChanged(pr)
    End If
Else If e.DataCol.Name Like "*房_应付" Then
    Dim pr As DataRow
    pr = DataTables("水电气统计").Find("项目 = '" & e.DataCol.Name.split("_")(0) & "' and 项目ID='" & e.DataRow(e.DataCol.Name.split("_")(0) & "_ID") & "'")
    If pr IsNot Nothing Then
        DataTables("水电气统计").DataCols("项目ID").RaiseDataColChanged(pr)
    End If
End If

 回到顶部