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!

Accessing a Catalog

Status
Not open for further replies.
Mar 14, 2005
1
US
I am trying to access a Catalog within Impromptu using a macro, but I am having a little bit of trouble. I am a basic user of the program, and I think that that might be the problem or it might be that I need to use my login information. I have left the code below. Any suggestions on how to get this macro to open the catalog and then the report?

Sub Main()
Dim objImpApp as Object
Dim objImpRep as Object
Set objImpApp = _
CreateObject("CognosImpromptu.Application")
objImpApp.OpenCatalog _
"I:\catalog\USS MACS COS.cat", "User"
Set objImpRep = _
objImpApp.OpenReport("E:\Commercial\Impromptu Requests\MACS_COS_TRADE.imr")
objImpRep.RetrieveAll
objImpRep.ExportASCII("c:\Tradecos.csv")
objImpRep.CloseReport
objImpApp.Quit
Set objImpRep = Nothing
Set objImpApp = Nothing
End Sub
 
tostrowski:
I copied and ran and it ran.......I added just one line.....it will be indicated by the ** sign...

Sub Main()
Dim objImpApp as Object
Dim objImpRep as Object
Set objImpApp = _
CreateObject("CognosImpromptu.Application")
**objImpApp.Visible True**
objImpApp.OpenCatalog _
"I:\catalog\USS MACS COS.cat", "User"
Set objImpRep = _
objImpApp.OpenReport("E:\Commercial\Impromptu Requests\MACS_COS_TRADE.imr")
objImpRep.RetrieveAll
objImpRep.ExportASCII("c:\Tradecos.csv")
objImpRep.CloseReport
objImpApp.Quit
Set objImpRep = Nothing
Set objImpApp = Nothing
End Sub



John Organ
MIS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top