Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共11 条记录, 每页显示 10 条, 页签: [1] [2]
[浏览完整版]

标题:SQLGroupTableBuilder

1楼
1234567 发表于:2024/9/19 13:32:00
Dim b As New SQLGroupTableBuilder("统计表1", "订单")
b.C
b.AddTable("订单", "产品ID", "产品", "产品ID") '添加统计表
b.Groups.AddDef("产品ID") ' 如何才能根据产品ID分组?
b.Totals.AddDef("数量") '对数量进行统计
b.Build '生成统计表
Maintable = Tables("统计表1") '打开生成的统计表

图片点击可在新窗口打开查看此主题相关图片如下:5.png
图片点击可在新窗口打开查看
2楼
有点蓝 发表于:2024/9/19 13:34:00
http://www.foxtable.com/webhelp/topics/3299.htm
3楼
1234567 发表于:2024/9/19 14:17:00
 

Dim b As New SQLGroupTableBuilder("统计表1","订单")
b.ConnectionName =
"Sale"
b.AddTable(
"订单","产品ID","产品","产品ID") '添加统计表
b.Groups.AddDef(
"产品名称") '根据产品名称分组
b.Groups.AddDef(
"日期", DateGroupEnum.Year, "年") '根据日期按年分组
b.Totals.AddDef(
"数量") '对数量进行统计
b.Build
'生成统计表
Maintable
= Tables("统计表1") '打开生成的统计表

 

 

如何把"统计表1"移入到窗口中Table控件?

4楼
1234567 发表于:2024/9/19 14:55:00

Dim Filter As String
Dim txt1 As String = e.Form.Controls("DropBox1").Text
Dim txt2 As String = e.Form.Controls("DropBox2").Text
Dim txt3 As String = e.Form.Controls("DropBox3").Text
Dim txt4 As String = e.Form.Controls("DropBox4").Text
Dim txt5 As String = e.Form.Controls("DropBox5").Text
Dim b As New SQLGroupTableBuilder("标准工艺库", "工艺内容")
b.AddTable("工艺内容", "工艺单编号", "零件加工", "工艺单编号")
b.C
b.Groups.AddDef("{零件加工}.工艺单编号") '根据订单表产品ID分组
b.Totals.AddDef("是否定为标准工艺")
Filter = "是否定为标准工艺 = True"

If txt1 <> "" Then
    b.Totals.AddExp(txt1, "iif(工序='" & txt1 & "' ,1,0)")
    Tables("工艺库_Table03").SetColVisibleWidth("工艺单编号|70|是否定为标准工艺|70|" & txt1 & "|100")  能生成
 
   If Filter > "" Then
        Filter = Filter & " And "
    End If
    Filter = Filter & txt1 & "> 0"
End If

If txt2 <> "" Then
    b.Totals.AddExp(txt2, "iif(工序='" & txt2 & "' ,1,0)")
    Tables("工艺库_Table03").SetColVisibleWidth("工艺单编号|70|是否定为标准工艺|70|" & txt1 & "|100|" & txt2 & "|100")     不能生成
    If Filter > "" Then
        Filter = Filter & " And "
    End If
    Filter = Filter & txt2 & "> 0"
End If

If txt3 <> "" Then
    b.Totals.AddExp(txt3, "iif(工序='" & txt3 & "' ,1,0)")
     Tables("工艺库_Table03").SetColVisibleWidth("工艺单编号|70|是否定为标准工艺|70|" & txt1 & "|100|" & txt2 & "|100|" & txt3 & "|100")
    If Filter > "" Then
        Filter = Filter & " And "
    End If
    Filter = Filter & txt3 & "> 0"
End If

If txt4 <> "" Then
    b.Totals.AddExp(txt4, "iif(工序='" & txt4 & "' ,1,0)")
      Tables("工艺库_Table03").SetColVisibleWidth("工艺单编号|70|是否定为标准工艺|70|" & txt1 & "|100|" & txt2 & "|100|" & txt3 & "|100|" & txt4 & "|100")
    If Filter > "" Then
        Filter = Filter & " And "
    End If
    Filter = Filter & txt4 & "> 0"
End If

If txt5 <> "" Then
    b.Totals.AddExp(txt5, "iif(工序='" & txt5 & "' ,1,0)")
    Tables("工艺库_Table03").SetColVisibleWidth("工艺单编号|70|是否定为标准工艺|70|" & txt1 & "|100|" & txt2 & "|100|" & txt3 & "|100|" & txt4 & "|100|" & txt5 & "|100")
    If Filter > "" Then
        Filter = Filter & " And "
    End If
    Filter = Filter & txt5 & "> 0"
End If

b.Build
If Filter > "" Then
    Tables("工艺库_TABLE03").Filter = Filter    不能Filter
End If

5楼
有点蓝 发表于:2024/9/19 15:20:00
http://www.foxtable.com/webhelp/topics/1909.htm

需要绑定窗口表后,对表格的各种设置才有效
6楼
1234567 发表于:2024/9/19 16:00:00
Dim Filter As String
Dim txt1 As String = e.Form.Controls("DropBox1").Text
Dim txt2 As String = e.Form.Controls("DropBox2").Text
Dim txt3 As String = e.Form.Controls("DropBox3").Text
Dim txt4 As String = e.Form.Controls("DropBox4").Text
Dim txt5 As String = e.Form.Controls("DropBox5").Text
Dim b As New SQLGroupTableBuilder("标准工艺库", "工艺内容")
b.AddTable("工艺内容", "工艺单编号", "零件加工", "工艺单编号")
b.C
b.Groups.AddDef("{零件加工}.工艺单编号") '根据订单表产品ID分组
Tables("工艺库_Table03").DataSource = b.BuildDataSource()   加了这句后后出错
b.Totals.AddDef("是否定为标准工艺")
Filter = "是否定为标准工艺 = True"
7楼
1234567 发表于:2024/9/19 16:01:00

图片点击可在新窗口打开查看此主题相关图片如下:8.png
图片点击可在新窗口打开查看
8楼
有点蓝 发表于:2024/9/19 16:52:00
请上传实例说明
9楼
1234567 发表于:2024/9/20 8:09:00

 

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:管理项目7.zip

[此贴子已经被作者于2024/9/20 8:17:51编辑过]
10楼
1234567 发表于:2024/9/20 8:10:00

图片点击可在新窗口打开查看此主题相关图片如下:66.png
图片点击可在新窗口打开查看
共11 条记录, 每页显示 10 条, 页签: [1] [2]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02344 s, 3 queries.