Foxtable(狐表)用户栏目专家坐堂 → 请教老师纠正


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

主题:请教老师纠正

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/10/24 19:13:00 [显示全部帖子]

        For Each dr As  DataRow  In drs

            Filter =  "[_Identify] <= " & dr("_Identify") & " And [配件信息_配件编码] = '" & dr("配件信息_配件编码") & "'"

            Dim Val1 As Double = e.DataTable.Compute("Sum(出入库信息_入库数量)",Filter)

            Dim Val2 As Double = e.DataTable.Compute("Sum(出入库信息_出库数量)",Filter)

            Dim Val3 As Double = e.DataTable.Compute("Sum(库存结余)",Filter & " And 出入库信息_入库数量 Is null And 出入库信息_出库数量 Is null")

            dr("库存结余") = Val1 - Val2 + val3

        Next

 

改成

 

        For Each dr As  DataRow  In drs

            Filter =  "[_Identify] <= " & dr("_Identify") & " And [配件信息_配件编码] = '" & dr("配件信息_配件编码") & "'"

            Dim Val1 As Double = e.DataTable.Compute("Sum(出入库信息_入库数量)",Filter)

            Dim Val2 As Double = e.DataTable.Compute("Sum(出入库信息_出库数量)",Filter)

            dr("库存结余") = Val1 - Val2

        Next


 回到顶部