请问老师如何修改?
自定义函数“统计”
'Function.Execute(函数名,窗口名0,目标表名1,基表2,逻辑3,分组行4,统计行5,右表6,关联列7)
'分组行与统计行为数组或集合
'Dim d As List(of String) = args(4)
'Dim t As List(of String) = args(5)
Dim g As New sqlGroupTableBuilder(args(1), Args(2))
If args(3) = True Then '如果需要多表查询
g.AddTable(Args(2),Args(7),Args(6),Args(7))
End If
For i As Integer = 0 To args(4).count - 1 '多个分组行
g.Groups.AddDef(args(4)(i))
Next
For i As Integer = 1 To args(5).Count - 1 '多个统计行
g.Totals.AddDef(args(5)(i))
Next
g.VerticalTotal = True
g.GrandProportion = True
g.SamePeriodGrowth = True
g.CircleGrowth = True
g.Filter = fil
g.Build()
Forms(args(2)).Controls("Table1").Table.DataSource = g.BuildDataSource
窗口中执行总是出错,提示:未将对象引用设置到对象的实例。
Dim a() As String = {"商品名称"}
Dim b() As String = {"数量","金额","毛利"}
Dim c,d As List(of String)
c.AddRange(a)
d.AddRange(b)
'Functions.Execute("统计","销售报表","统计","出库明细",False,c,d)