公共数组不接受值

时间:2014-10-20 19:05:33

标签: arrays reporting-services

我遇到了公共阵列的问题。我使用其他语言的数组,以下代码似乎有意义:它应该工作。

当我尝试获取任一数组中的任何值时,它会返回空白。

public dim TicketSerial(0) as String 
public dim TicketOpenedDate(0) as Date

function LoadFPRArray(ByVal LoadSerial as string, ByVal LoadTicketOpenedDate as Date) As Boolean
'Load array of ticket data into global variable (Create a hidden table to 'accomplish this, sort on date). Serial / Opened Date

Dim k as Long

k = UBound(TicketSerial)+1

Redim Preserve TicketSerial(0 to k) 
Redim Preserve TicketOpenedDate(0 to k)

TicketSerial(k) = LoadSerial
TicketOpenedDate(k) = LoadTicketOpenedDate

return true

end function

0 个答案:

没有答案