I am getting this error when trying to run an actuate report: USE OF NULL INSTANCE HANDLE . I have included the fetch method code below with the line prompting the error in bold.
Code:
Function Fetch( ) As AcDataRow
Dim outputRow as DataRow1
dim rowdone as boolean
rowdone = false
'showfactorystatus("runnig...")
do
' check for prior rows, if none, fetch new ones
if fr is Nothing then
set fr = FInput.Fetch()
end if
'if er is Nothing then
' set er = EndInput.Fetch()
'end if
if fr is Nothing then 'OR er is Nothing then
set Fetch = Nothing
exit function
End if
if fr.GetValue("MasterDefFlag") = "YES" then
[b]outputRow.SetValue("MasterDefComments", fr.GetValue("DefComments"))[/b]
outputRow.SetValue("MasterDefDesc", fr.GetValue("DefDesc"))
outputRow.SetValue("MasterDefDueDate", fr.GetValue("DefDueDate"))
outputRow.SetValue("MasterOwner", fr.GetValue("DefOwner"))
'outputRow.SetValue("LOBFrom", fr.GetValue("LOBFrom"))
' set er=Nothing
set fr = Nothing
else
outputRow.SetValue("AggAP", fr.GetValue("APName"))
outputRow.SetValue("AggDesc", fr.GetValue("DefDesc"))
outputRow.SetValue("AggDueDate", fr.GetValue("DefDueDate"))
outputRow.SetValue("AggOwner", fr.GetValue("DefOwner"))
outputRow.SetValue("AggStream", fr.GetValue("Stream"))
outputRow.SetValue("MasterTheme", fr.GetValue("DefTheme"))
set fr = Nothing
rowdone = true
'end if
end if
loop until rowdone = true
Set Fetch = outputRow
End Function