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("统计列"))
wb.AddTable("","Table1").CreateFromDataTable(b.Build(True))
Else
wb.InsertHTML("请按输入分组列和统计列!")
End IfDim wb2 As New weui
With wb2.AddTable("","Table1")
'按日期顺序列出客户CS01的订单,仅显示产品/数量/单价/日期/审核等五列
.CreateFromDataTable(DataTables("订单"),False,"客户='CS01'","日期 desc","产品","单价","数量","日期","审核")
End With
e.WriteString(wb.Build & "|" & wb2.Build)
-----------------
function tongji(){
var result = submitAjaxForm('form1','',false);
var a = result.split("|")
document.getElementById("p1").innerHTML=a[0];
document.getElementById("p2").innerHTML=a[1];
}