http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=59807&skin=0
昨天提的问题,会出现如下问题
此主题相关图片如下:0.jpg
这句代码有错误:
Tables("Sales_Order_Product").Filter = "OrderId In (" & DataTables("Sales_Order_List").GetComboListString("Id", Tables("Sales_Order_List").Filter).Replace("|", ",") & ")"
Dim conStart As WinForm.DateTimePicker = e.Form.Controls("DateTimeStart")
Dim conEnd As WinForm.DateTimePicker = e.Form.Controls("DateTimeEnd")
Dim b As New SQLGroupTableBuilder("统计表1","Sales_Order_List")
b.C
Tables("Sales_Order_List").Filter = "SubmitDate >= #" & conStart.text & "# And SubmitDate <= #" & conEnd.text & "# And SubmitUserName = '" & _UserName & "'"
Tables("Sales_Order_Product").Filter = "OrderId In (" & DataTables("Sales_Order_List").GetComboListString("Id", Tables("Sales_Order_List").Filter).Replace("|", ",") & ")"
b.Filter = Tables("Sales_Order_Product").Filter
b.AddTable("Sales_Order_Product","OrderId","Sales_Order_List","Id")
b.AddTable("Sales_Order_Product","ProductId","Sales_Product_List","Id")
b.AddTable("Sales_Order_List","CustomerId","Customer_List","Id")
b.Groups.AddDef("{Sales_Product_List}.Name")
b.Groups.AddDef("{Customer_List}.Name")
b.Groups.AddDef("{Sales_Order_List}.SubmitDate")
b.Groups.AddDef("{Sales_Order_List}.SubmitUser")
b.Totals.AddDef("Amount")
'b.Totals.AddExp("SalesPrice2","已交数量*Price")
b.Build '生成统计表
Tables("统计分析_Table1").DataSource = b.BuildDataSource()