以下是引用狐狸爸爸在2017/4/13 11:53:00的发言:
为什么我测试没问题啊
确实是有问题,格式都不会带上的 http://www.foxtable.com/mobilehelp/scr/0110.htm
Select Case e.Path
Case "test.htm"
Dim wb As New weui
wb.AddForm("","form1","tongji.htm")
With wb.AddInputGroup("form1","ipg1","销售统计")
.AddSelect("水平分组","水 平分组","产品|客户|雇员")
.AddSelect("垂直分组","垂直分组","产品|[客户]|雇员")
.AddSelect("统计列","统计列","数量|金额")
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "统计", "button").Attribute= "onclick= 'tongji()'"
End With
wb.AppendHTML("<div id='p1' style='margin:0.5em'></div>") '插入一个div,用于显示服务器返回的 页面
wb.AppendHTML("<script src='./lib/test.js'></script>") '引入脚本文件
e.WriteString(wb.Build)
Case "tongji.htm"
Dim wb As New weui
If e.PostValues.ContainsKey("垂直分组") AndAlso e.PostValues.ContainsKey("水平分组") AndAlso e.PostValues.ContainsKey("统计列") Then
Dim b As New CrossTableBuilder("统计表1",DataTables("订单"))
b.HGroups.AddDef(e.PostValues("水平分组"))
b.VGroups.AddDef(e.PostValues("垂直分组"))
b.Totals.AddDef(e.PostValues("统计列"))
b.VerticalProportion = True
wb.AddTable("","Table1").CreateFromDataTable(b.Build(True))
Else
wb.InsertHTML("请按输入分组列和统计列!")
End If
e.WriteString(wb.Build)
End Select
[此贴子已经被作者于2017/4/13 12:11:46编辑过]