两个办法:
1.使用专业报表,类似这样。
2.使用筛选或者加载的方法生成新的数据表,然后进行汇总。
Dim Filter As String
Filter = "客户名称 = '高海鹰'"
MessageBox.Show(filter)
Dim s As String
DataTables("da").Fill("Select * From {高明细} where " & filter , True)
'e.Form.Controls("client").Value
'
Dim t As Table = Tables("da")
Dim g As Subtotalgroup
t.SubtotalGroups.Clear()
t.GroupAboveData = False
t.TreeVisible = True
t.SpillNode = True
g = New Subtotalgroup
g.Aggregate = AggregateEnum.Sum
g.GroupOn = "月"
g.TotalOn = "本期应收本币,本期收回本币,余额本币"
g.Caption = "{0} 小计"
t.SubtotalGroups.Add(g)
t.Subtotal()
如果做的更细些,就用生成的这张表,做成excel报表统计
[此贴子已经被作者于2013-6-29 0:09:38编辑过]