老师下面代码执行是提示:”不存在名称为”商品明细单“的Table“Dim ks As String = e.Form.Controls("TextBox1").Value
If ks Is Nothing Then
MessageBox.show("请输入单号ID")
Else
Dim g As New CrossTableBuilder("商品明细单", DataTables("rs_indepot"))
g.HGroups.AddDef("proname", "商品名称")
g.HGroups.AddDef("probar", "商品条码")
g.Totals.AddDef("sourcecode", AggregateEnum.Count, "溯源码")
g.OrderByTotal = True
g.HorizontalTotal = True
g.VerticalTotal = True
g.FromServer = True
g.Filter = "ordercid = '" & ks & "'"
g.Build()
MainTable = Tables("商品明细单")
MainTable.AutoSizeCols(5)
MainTable.Focus()
End If
交叉统计没有指定垂直分组。如果不需要垂直分组请使用分组统计