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!

Automation: OpenReport fails

Status
Not open for further replies.

SicBstrd

Programmer
Sep 26, 2006
15
AT
Hello!
I try to work with Impromptu via Automation (using either VB or VBA).

The problem is that when I call the OpenReport-Method it fails with error number 0 (internal error 61704).

I found out that this error occurs because Impromptu is still busy opening the report or retrieving the data.

I tried to not auto-retrieve the data and to get the data by calling "RetrieveAll" after opening the report but then an error occurs when calling the RetrieveAll-Method (Error number 24608 - application busy).

The strange thing is, that everything works fine when I step through my code but it fails when executing it normally!

Thanks in advance for any hints!
 
Dim objImpAnw As Object
Dim impReport As Object

Set objImpAnw = CreateObject("CognosImpromptu.Application")
'objImpAnw.Visible True
Set impReport = objImpAnw.OpenReport("Z:\impReports\transactions.imr", "2006-09-26")

Call impReport.RetrieveAll
impReport.ExportText ("Z:\impReports\export\transactions.txt")
 
EDIT: working with Cognos Impromptu (Administrator's version) 7.1.803.0
 
I found the reason!
Setting for "Impromptu Data Path" is by default set to "WINDOWS\system32" but in that Directory I do not have permissions to write -> No temp-file could be created!

I changed the setting and everything works now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top