以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]自定义函数问题  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=108628)

--  作者:minxizai
--  发布时间:2017/10/26 10:48:00
--  [求助]自定义函数问题
请问老师如何修改?
自定义函数“统计”
\'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)

--  作者:有点甜
--  发布时间:2017/10/26 11:11:00
--  

Dim c,d As List(of String)

 

改成

 

Dim c As New List(of String)

Dim d As New List(of String)


--  作者:minxizai
--  发布时间:2017/10/26 11:29:00
--  
谢谢图片点击可在新窗口打开查看