Hi,
I just started using Cognos Series 7.0,and am updating my reports and macros. The macros are failing because the CreateObject Function is failing. The Code I used is as follows:
Dim ImpApp as Object
Dim ImpRep as Object
Sub Main
Set ImpApp= CreateObject("CognosImpromptu.Application"
cat_dir="N:\shared\catalogs\PayRoll.cat"
rep_dir="N:\shared\Misc Reports\Labor Distribution Hotfile.imr"
ImpApp.OpenCatalog cat_dir,"User"
sPrompt=sBegDate & "|" & sEndDate
Set ImpRep = ImpApp.OpenReport(rep_dir,sPrompt)
ImpRep.RetrieveAll
strHotFile=Left$(ImpRep.FullName, Len(ImpRep.FullName) - 4)
ImpRep.ExportHotFile strHotFile & ".ims"
Set ImpRep=Nothing
Set ImpApp = Nothing
End Sub
--- When I run this i get an error:
R429 "Object creation failed - bad object class"
Can someone tell me what's wrong?
Thanks for the help!
I just started using Cognos Series 7.0,and am updating my reports and macros. The macros are failing because the CreateObject Function is failing. The Code I used is as follows:
Dim ImpApp as Object
Dim ImpRep as Object
Sub Main
Set ImpApp= CreateObject("CognosImpromptu.Application"
cat_dir="N:\shared\catalogs\PayRoll.cat"
rep_dir="N:\shared\Misc Reports\Labor Distribution Hotfile.imr"
ImpApp.OpenCatalog cat_dir,"User"
sPrompt=sBegDate & "|" & sEndDate
Set ImpRep = ImpApp.OpenReport(rep_dir,sPrompt)
ImpRep.RetrieveAll
strHotFile=Left$(ImpRep.FullName, Len(ImpRep.FullName) - 4)
ImpRep.ExportHotFile strHotFile & ".ims"
Set ImpRep=Nothing
Set ImpApp = Nothing
End Sub
--- When I run this i get an error:
R429 "Object creation failed - bad object class"
Can someone tell me what's wrong?
Thanks for the help!