Dim dt As DataTable = DataTables("订单")
DataTables("销售统计").DataRows.Clear
For Each p As String In dt.GetValues("产品ID")
For Each x As String In dt.GetValues("客户ID")
Dim dr As DataRow = DataTables("销售统计").AddNew()
dr("产品ID") = p
dr("客户ID") = x
dr("数量") = dt.Compute("sum(数量)" , "[产品ID]=\'" & p & "\'" And "[客户ID]=\'" & x & "\'")
Next
Next