Dim doc As New PrintDoc
Dim rx As New prt.RenderText
Dim rt As New prt.RenderTable
Dim Agg1 As New prt.DataBinding.Aggregate("数量小计")
Dim Agg2 As New prt.DataBinding.Aggregate("金额小计")
rt.Style.GridLines.All =
New prt.Linedef(Color.Gray)
rt.CellStyle.Spacing.All = 1
rt.Cells(0,0).Text = "产品"
rt.Cells(0,1).Text = "数量"
rt.Cells(0,2).Text =
"金额"
rt.Cells(1,0).Text =
"[Fields!产品.Value]"
rt.Cells(1,1).Text =
"[Aggregates!数量小计.Value]"
rt.Cells(1,2).Text =
"[Aggregates!金额小计.Value]"
With rt.RowGroups(1,1)
.DataBinding.DataSource =
BindTables("订单")
.DataBinding.Grouping.Expressions.Add("Fields!产品.Value")
agg1.DataBinding =
.DataBinding
agg1.Running = 1
agg1.ExpressionText = "Fields!数量.Value"
doc.DataSchema.Aggregates.Add(agg1)
agg2.DataBinding = .DataBinding
agg2.Running = 1
agg2.ExpressionText = "Fields!金额.Value"
doc.DataSchema.Aggregates.Add(agg2)
End
With
doc.body.Children.Add(rt)
doc.Preview()
怎么增加一行 统计 数量 金额
[此贴子已经被作者于2021/3/13 19:58:00编辑过]