可以向Totals添加表达式统计列,语法是:
Totals.AddExp(Name, Expression)Totals.AddExp(Name, Expression, Caption)Totals.AddExp(Name, Expression, Aggregate)Totals.AddExp(Name, Expression, Caption, Aggregate)
Name: 字符型,指定列名Expression:字符型,指定表达式。Caption: 字符型,指定列标题Aggregate: AggregateEnum枚举型,用于指定统计类型,默认是求和。
例如:
Dim b As New SQLGroupTableBuilder("统计表1","订单")b.Totals.AddExp("金额","数量 * 单价 * (1-折扣)")