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!

Running Macros in Scheduler for Impromptu Reports

Status
Not open for further replies.

melsch

IS-IT--Management
Feb 29, 2008
7
US
I'm new to macros in Cognos but am trying to create a macro that will run an Impromptu Report in Scheduler unattended. The part I'm having problems getting past is the Progress database logon screen. We are not using logon names and passwords for Progress so normally, when this prompt displays in Impromptu, I would simply ENTER through it to connect to the DB. When I try to run the macro in Scheduler, the procedure will sit at the logon for Progress until I press ENTER. I've read through several threads that have talked about this issue but am still not having any success. A copy of my macro is below that includes the syntax suggested in a thread, but I'm still being prompted for a database logon and password.

Can anyone offer assistance on how I can make this macro run totally unattended.

Thanks!



Sub Main

' ******************* Declare Variables ************************

'Dimension variables needed by the script
Dim ImpApp as object 'references the Impromptu application object
Dim ImpCat as object 'references the Catalog object
Dim ImpRep as object 'references the Report object
Dim User As Object 'references the User object


' ******************* Begin Execution ************************


On Error Resume Next

'First instantiate the application
Set ImpApp = CreateObject("Impromptu.Application")



ImpRep.ExportExcelWithFormat "O:\SytePwr\melTest.xls"

'Set to 1 for the application to be visible
ImpApp.Visible 1

'Open the correct catalog for the report
ImpApp.OpenCatalog "O:\SytePwr\Catalogs\fs-plus.cat","Creator",,,,1


'Open the actual report
Set ImpRep = ImpApp.OpenReport ("O:\Sytepwr\Reports\IT\Mods\Daily Customer Service Reports\Sales - SROs with Missing Jobs.imr")

'Retrieve all data for the report
ImpRep.RetrieveAll

'Print the report
ImpRep.Print

'Close the report
ImpRep.CloseReport

'Close the catalog
ImpApp.CloseCatalog

'Quit the application
ImpApp.Quit

'Release the application memory
Set ImpApp = Nothing

End Sub
 
Have you tried unchecking the user ID prompts box in Impromptu?
Catalog > Databases > (select Database ) > Edit > User Prompts > Uncheck User ID

soi la, soi carré
 
drlex:

Thanks for the suggestion, however, I have ensured those boxes are unchecked. My only other thought would be to create a Progress username and password that would only be used for the purpose of running macros in Scheduler. When I had done that before (which is how I always set it up at other companies), it affected the user's ability to send e-faxes from within Syteline (they wouldn't send properly).

Any other ideas or suggestions are appreciated.

Thank you.
 
Sorry it was of no consequence; we run against a Progress DB via ODBC connectivity in Windows for some reporting and OLAP and do not have this issue unless that box is checked. Is it possible that the log-on requirement is at a lower level - e.g. the ODBC configuration?

soi la, soi carré
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top