No matter what I do, I end up with Object reference not set to an instance of an object at runtime. The problem is RptParamList().
The Structure is...
Partial Class WebReports_RptGeneric
Inherits Page
Protected ObjUtils As New Utilities
Protected ObjDtn As New DataTable
Structure SchedParms
Shared ReportName As String
Shared RptParamList() As ParameterValue
End Structure
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim objSecurit As New STISecurity
Dim intRc As Integer
Dim objAudit As New Audits
...
Public Sub XqtSaveSched(ByVal sender As System.Object, ByVal e As System.EventArgs)
'Get Report Name and Report Parameters
paramList.Clear()
dt.Reset()
dt = ObjUtils.GetDataTableForQuery("sp_GetPosFieldNames", paramList)
ReDim SchedParms.RptParamList(13)
SchedParms.RptParamList(0).Name = "rpFY" (BLOWS UP HERE!!)
SchedParms.RptParamList(0).Value = CStr(Session("FY"))
SchedParms.RptParamList(1).Name = "rpUserID"
SchedParms.RptParamList(1).Value = "1000000"
SchedParms.RptParamList(2).Name = "rpShowLinks"
SchedParms.RptParamList(2).Value = CStr(False)
I tried adding the ReDim statement as an initializer, but that didn't work. I also tried SchedParms.RptParamList(0) = new ParameterValue() , but that didn't work either.