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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closing Down Impromptu after Scheduled Tasks Complete

Status
Not open for further replies.

annie2

MIS
Nov 4, 2002
4
0
0
IE
Hi,

I have 7 reports scheduled for update on a nightly basis, with the results saved in Excel format. Each morning the individual Impromptu sessions (one for each report) are still open. Is it possible to close these down from within scheduler? I want to keep this batch job in scheduler and avoid macros.

Thanks in advance,

Anne
 
Anne,
I recall from a Cognos training programme that this was a bug; perhaps there is a fix for it (MR1 or MR2?) now.

I had to have a workround, since our ODBC set-up limits the number of open applications, so I delved into macros.

I'd recommend you give them a go - I just used the help file and the good examples therein to cobble together half a dozen macros to run impromptu reports, build cubes, save excel results and email them to colleagues.

If you like, I can email you a couple for you to work from.

happy friday,
lex
 
As far as I know you can't tell Impromptu to close down after running a report when calling it from a batch file.
The only way to do it would be to use a macro.

You can tell transformer to run in batch mode - which is why it closes down after running - however as far as I am aware there is no batch mode for Impromptu.

Paul.
 
Hi,

Thanks for your replies. I have tried setting up a macro for this but this sometimes leads to a runtime error as follows:
"Program: C:\Programfiles...\Impadmin.exe
R6025 - pure virtual function call"

Any ideas?

Code used is follows and is simply repeated for all reports:

Sub Main()
Dim objImpApp as Object
Dim objImpRep as Object
Set objImpApp = CreateObject("CognosImpromptu.Application")

objImpApp.OpenCatalog "c:\mis\catalogs\opmi.cat", "Creator"

Set objImpRep = objImpApp.OpenReport("u:\mis\reports\ConvRates.imr")

objImpRep.Visible True

SendKeys "%F",1
SendKeys "A",1
SendKeys "{TAB}",1
SendKeys "{DOWN 8}",1
SendKeys "{ENTER}",1
SendKeys "+{TAB}",1
SendKeys "h:\mis\reports\ConvRates.xls",1
SendKeys "{ENTER}",1
SendKeys "{TAB}",1
SendKeys "{ENTER}",1
objImpRep.CloseReport
objImpApp.Quit
Set objImpRep = Nothing
Set objImpApp = Nothing

End Sub

Regards,
Anne
 
Anne,
I am having the same problem. information on the following thread has been helpful, but I still don't have a way to shut down Impromptu.

thread401-292274Hope this helps !
- Dona
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top