Foxtable(狐表)用户栏目专家坐堂 → 这个代码有啥问题?


  共有4969人关注过本帖平板打印复制链接

主题:这个代码有啥问题?

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


加好友 发短信
等级:三尾狐 帖子:760 积分:4714 威望:0 精华:0 注册:2011/12/17 18:37:00
这个代码有啥问题?  发帖心情 Post By:2013/9/1 22:37:00 [只看该作者]

Dim Filter As String
Dim br As DataRow
Dim Val As Double
Dim Arys As List(Of String())
Arys = DataTables("行政后勤管理").GetUniqueValues("年 Is Not Null","年","月","报表名称","统计类型","项目","数据统计项目")
For Each Ary As String() In Arys
    Filter = "年 = '" & Ary(0) & "'And 月 ='" & Ary(1) & "' And 报表名称='" & Ary(2) & "'And 统计类型 = '"  & Ary(3) & "'And 项目 ='" & Ary(4) & "'And 数据统计项目='" & Ary(5) & "'"
    If Filter > "" Then
        br = DataTables("汇总表").Find(Filter)
        If br IsNot Nothing Then
            Dim s() As String = {"一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"}
            For i As Integer = 0 To s.Length - 1
                Val= DataTables("行政后勤管理").Compute("Sum(s(i))",Filter)
                If Val > 0 Then
                    br(S(i)) = Val
                Else
                    br(S(i)) = Nothing
                End If
            Next
        End If
    End If
Next


DataTables("汇总表").ResumeRedraw


 回到顶部