Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error while trying to open an Imp report from a macro!! -HELP

Status
Not open for further replies.

bobg4u

IS-IT--Management
Jun 3, 2003
46
CA
I am trying to open an print a report from a macro, and the macro fails even while creating teh Report Object. Can someone pls look the code below and tell me what's worng?
thanks for the help!
btw, i am running Impromptu Ver7.2 on Win 2000.

Sub Main()
Dim objImpApp as Object
Dim objImpRep as Object
Dim strReportName As String

On error goto ErrRtn

Set objImpApp = CreateObject("CognosImpromptu.Application")
objImpApp.OpenCatalog "C:\temp\temp.cat", "User"
strReportName = "C:\temp\temp.imr"
Set objImpRep = objImpApp.OpenReport(strReportName)
strReportName = objImpRep.FullName
objImpRep.RetrieveAll
objImpRep.Print
objImpRep.CloseReport
objImpApp.Quit

Set objImpRep = Nothing
Set objImpApp = Nothing


exit sub
ErrRtn:
msgbox "Error occured at " & Erl & " Error is " & Err

Set ImpRep = Nothing
Set ImpApp = Nothing
exit sub

End Sub
 
I am sorry I didn't include the error message. The message i get is:
R440 "Impromptu: Internal application error."
sometimes,it gives athe follwing error:
R440 "Impromptu: Report could not be opened (C:\temp\temp.imr). The doc pointer is NULL."

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top