Foxtable(狐表)用户栏目专家坐堂 → 怎么在这个的基础上按照序号来分段显示一个小计


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

主题:怎么在这个的基础上按照序号来分段显示一个小计

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


加好友 发短信
等级:幼狐 帖子:51 积分:494 威望:0 精华:0 注册:2020/2/21 10:32:00
怎么在这个的基础上按照序号来分段显示一个小计  发帖心情 Post By:2020/6/30 13:55:00 [只看该作者]

Dim d1 As Date = e.Form.Controls("B").Value
Dim d2 As Date = e.Form.Controls("C").Value
Dim s As String = e.Form.Controls("A").Value
Dim cmb As WinForm.ComboBox = e.form.Controls("ComboBox1")
If d1 = Nothing Or d2 = Nothing Then
    MessageBox.Show("日期都不能为空","友情提醒",MessageBoxButtons.OK,MessageBoxIcon.Warning)
Else
    With DataTables("生产记录")
        .LoadFilter = "日期>=#" & d1 & "# and 日期<=#" & d2 & "# and 配方名称 = '" & s & "'"
        .Load()
    End With
 Dim b As New GroupTableBuilder("统计表5",DataTables("生产记录"))
     b.Groups.AddDef("原料名称")
     b.Groups.AddDef("序号")
     b.Build  
     MainTable = Tables("统计表5")
     cmb.ComboList = DataTables("统计表5").GetComboListString("序号")
End If

Dim mb As WinForm.ComboBox
mb = Forms("窗口2").Controls("ComboBox1")
e.form.controls("D").text = mb.ComboList.split("|").length


Dim d11 As Date = e.Form.Controls("B").Value
Dim d12 As Date = e.Form.Controls("C").Value
Dim s1 As String = e.Form.Controls("A").Value
 If d1 = Nothing Or d2 = Nothing Then
    MessageBox.Show("日期都不能为空","友情提醒",MessageBoxButtons.OK,MessageBoxIcon.Warning)
Else

   With DataTables("生产记录")
        .LoadFilter = "日期>=#" & d11 & "# and 日期<=#" & d12 & "# and 配方名称 = '" & s1 & "'"
        .Load()
    End With
 Dim b1 As New GroupTableBuilder("统计表3",DataTables("生产记录"))
     b1.Groups.AddDef("日期")

     b1.Groups.AddDef("配方名称")
     b1.Groups.AddDef("原料名称")
     b1.Groups.AddDef("设定值")
     b1.Groups.AddDef("实际值")
     b1.Groups.AddDef("误差值")
     b1.Groups.AddDef("序号")


     b1.Build  
     MainTable = Tables("统计表3")
  '   Tables("窗口2_Table1").DataSource = b1.BuildDataSource()

End If

 回到顶部