Foxtable(狐表)用户栏目专家坐堂 → 同一段代码,为什么只能统计出一部分数据呢?


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

主题:同一段代码,为什么只能统计出一部分数据呢?

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


加好友 发短信
等级:四尾狐 帖子:867 积分:6210 威望:0 精华:0 注册:2012/11/24 20:44:00
同一段代码,为什么只能统计出一部分数据呢?  发帖心情 Post By:2013/5/4 9:18:00 [只看该作者]

如题,现在只能统计出回款类的数据,不能统计出费用的数据,这是什么?
1、这是统计效果,费用类的数据没有统计出来

图片点击可在新窗口打开查看此主题相关图片如下:1.png
图片点击可在新窗口打开查看
2、这是费用表,明明就有安徽的费用

图片点击可在新窗口打开查看此主题相关图片如下:2.png
图片点击可在新窗口打开查看

3、这是代码:哪儿错了?
Select e.DataCol.Name
    Case "分公司","期间_起始日","期间_截止日"
        If e.DataRow.IsNull("分公司") = False AndAlso e.DataRow.IsNull("期间_起始日") = False AndAlso e.DataRow.IsNull("期间_截止日") = False Then
            e.DataRow("回款_其它老") = DataTables("回款明细").Compute("sum(回款金额)","分公司='" & e.DataRow("分公司") & "' and 日期 > #" & e.DataRow("期间_起始日") & "# and 日期 < #" & e.DataRow("期间_截止日") & "# and 收款方式 <> '承兑' and 年份 <>  2013 ")
            e.DataRow("回款_其它新") = DataTables("回款明细").Compute("sum(回款金额)","分公司='" & e.DataRow("分公司") & "' and 日期 > #" & e.DataRow("期间_起始日") & "# and 日期 < #" & e.DataRow("期间_截止日") & "# and 收款方式 <> '承兑' and 年份 = 2013 ")
            e.DataRow("回款_承兑老") = DataTables("回款明细").Compute("sum(回款金额)","分公司='" & e.DataRow("分公司") & "' and 日期 > #" & e.DataRow("期间_起始日") & "# and 日期 < #" & e.DataRow("期间_截止日") & "# and 收款方式 = '承兑' and 年份 <>  2013 ")
            e.DataRow("回款_承兑新") = DataTables("回款明细").Compute("sum(回款金额)","分公司='" & e.DataRow("分公司") & "' and 日期 > #" & e.DataRow("期间_起始日") & "# and 日期 < #" & e.DataRow("期间_截止日") & "# and 收款方式 = '承兑' and 年份 = 2013 ")
            e.DataRow("费用_经理往来") = DataTables("费用").Compute("sum(支出金额)","分公司='" & e.DataRow("分公司") & "' and 日期 > #" & e.DataRow("期间_起始日") & "# and 日期 < #" & e.DataRow("期间_截止日") & "# and 费用类型 = '经理往来'")
            e.DataRow("费用_劳务费用") = DataTables("费用").Compute("sum(支出金额)","分公司='" & e.DataRow("分公司") & "' and 日期 > #" & e.DataRow("期间_起始日") & "# and 日期 < #" & e.DataRow("期间_截止日") & "# and 费用类型 = '劳务费用'")
            e.DataRow("费用_内部往来") = DataTables("费用").Compute("sum(支出金额)","分公司='" & e.DataRow("分公司") & "' and 日期 > #" & e.DataRow("期间_起始日") & "# and 日期 < #" & e.DataRow("期间_截止日") & "# and 费用类型 = '内部往来'")
            e.DataRow("费用_累计已付款") = e.DataRow("费用_经理往来") + e.DataRow("费用_劳务费用") + e.DataRow("费用_内部往来")
            e.DataRow("剩余可支配金额") = e.DataRow("回款_可支配总额") - e.DataRow("费用_累计已付款")
            e.DataRow("备注") = Nothing
        Else
            e.DataRow("回款_其它老") = Nothing
            e.DataRow("回款_其它新") = Nothing
            e.DataRow("回款_承兑老") = Nothing
            e.DataRow("回款_承兑新") = Nothing
             e.DataRow("费用_经理往来") = Nothing
            e.DataRow("费用_劳务费用") = Nothing
            e.DataRow("费用_内部往来") = Nothing
            e.DataRow("费用_累计已付款") = Nothing
            e.DataRow("剩余可支配金额") = Nothing
            e.DataRow("备注") = Nothing
        End If
End Select

 回到顶部
总数 17 1 2 下一页