I am getting an error while trying to retrieve the parameters of an instance when that instance is in a format other than crystal reports, like Word, Excel, etc. Here are the messages I get:
Error Number: 438
Error Message: Object doesn't support this property or method
I have cut out the section of code that retrieves the parameters. This code does work if the instance is a crystal report and I can retrieve other information from the instances such as the SI_ID, SI_OWNER, SI_PROGID, etc. I have narrowed down to find that I get the error when I attempt to "Set test3 = test2.ReportParameters.Count" or if I go straight to setting anything equal to "iObjs.Item(1).PluginInterface.ReportParameters" I get the error as well. I could really use some help or ideas here, because I'm stumped.
Dim iObjs
Set iObjs = iStore.Query("SELECT * FROM CI_INFOOBJECTS WHERE SI_ID = " & InstanceId & ""
Dim test1, test2, test3
Set test1 = iObjs.Item(1)
Set test2 = test1.PluginInterface
Set test3 = test2.ReportParameters.Count
if err.number = 0 then
' Add the parameters
With iObjs.Item(1).PluginInterface.ReportParameters
For lLcv3 = 1 to .Count
Response.Write ( .Item(lLcv3).CurrentValues.Item(1).Value & " " )
Next
End With
else
Response.Write("Error Desc = " & Err.Description & " "
end if
Error Number: 438
Error Message: Object doesn't support this property or method
I have cut out the section of code that retrieves the parameters. This code does work if the instance is a crystal report and I can retrieve other information from the instances such as the SI_ID, SI_OWNER, SI_PROGID, etc. I have narrowed down to find that I get the error when I attempt to "Set test3 = test2.ReportParameters.Count" or if I go straight to setting anything equal to "iObjs.Item(1).PluginInterface.ReportParameters" I get the error as well. I could really use some help or ideas here, because I'm stumped.
Dim iObjs
Set iObjs = iStore.Query("SELECT * FROM CI_INFOOBJECTS WHERE SI_ID = " & InstanceId & ""
Dim test1, test2, test3
Set test1 = iObjs.Item(1)
Set test2 = test1.PluginInterface
Set test3 = test2.ReportParameters.Count
if err.number = 0 then
' Add the parameters
With iObjs.Item(1).PluginInterface.ReportParameters
For lLcv3 = 1 to .Count
Response.Write ( .Item(lLcv3).CurrentValues.Item(1).Value & " " )
Next
End With
else
Response.Write("Error Desc = " & Err.Description & " "
end if