Foxtable(狐表)用户栏目专家坐堂 → 月报表问题


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

主题:月报表问题

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


加好友 发短信 一级勋章 三级勋章 二级勋章
等级:超级版主 帖子:6318 积分:33951 威望:0 精华:10 注册:2008/8/31 20:56:00
  发帖心情 Post By:2011/11/23 16:18:00 [显示全部帖子]

Dim s As String = e.Form.Controls("月份").Value
If s <> "" Then
    Dim f As New Filler
    f.SourceTable = DataTables("入仓")
    f.DataTable = DataTables("月报表")
    f.ExcludeExistValue = True
    f.Filter = "月份 = '" & s & "'"
    f.Fill()
   
    Dim f1 As New Filler
    f1.SourceTable = DataTables("出仓")
    f1.DataTable = DataTables("月报表")
    f1.ExcludeExistValue = True
    f1.Filter = "月份 = '" & s & "'"
    f1.Fill()
End If
For Each dr As DataRow In DataTables("月报表").DataRows
    赋值代码
Next

 回到顶部
帅哥哟,离线,有人找我吗?
czy
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 一级勋章 三级勋章 二级勋章
等级:超级版主 帖子:6318 积分:33951 威望:0 精华:10 注册:2008/8/31 20:56:00
  发帖心情 Post By:2011/11/23 21:22:00 [显示全部帖子]

DataTables("月报表").DataRows.Clear
Dim s As String = e.Form.Controls("月份").Value
If s <> "" Then
    Dim f As New Filler
    f.SourceTable = DataTables("入仓")
    f.DataTable = DataTables("月报表")
    f.ExcludeExistValue = True
    f.Filter = "月份 = '" & s & "'"
    f.Fill()
   
    Dim f1 As New Filler
    f1.SourceTable = DataTables("出仓")
    f1.DataTable = DataTables("月报表")
    f1.ExcludeExistValue = True
    f1.Filter = "月份 = '" & s & "'"
    f1.Fill()
   
    For Each dr As DataRow In DataTables("月报表").DataRows
        Dim s1 As String = "型号 = '" & dr("型号") & "' And 规格 = '" & dr("规格") & "' And 月份 = '" & s & "'"
        dr("本月入仓") = DataTables("入仓").Compute("Sum(入仓数量)",s1)
        dr("本月出仓") = DataTables("出仓").Compute("Sum(出仓数量)",s1)
    Next
End If

 回到顶部