welcome to Cognos Forms, 1hrllabs,
In order to help you, can you give a little more information?
What application are you using?
What is the relevant section of code that you have already?
Using Version 7.1
Sub Main()
Dim objImpApp As object
Dim objImpRep As Object
Set objImpApp = CreateObject("CognosImpromptu.Application")
objImpApp.Visible True
objImpApp.OpenCatalog _
"s:\imp71_reporting_tools\BI04\Imp71_User\CATALOGS\Costpoint Catalogs\General Ledger.cat","Plan","hire1cop",,,1
Set objImpRep = _
objImpApp.OpenReport("s:\imp71_reporting_tools\joe's reports\green book\01-expenses by org.imr")
objImpRep.CloseReport
objImpApp.Quit
Set objImpApp = Nothing
Set objImpRep = Nothing
End Sub
Because the report takes a couple of minutes to run I get a message that the application isn't responding. Also, I would like to include the print function.
1hrllabs, GilMerc is correct. Add a line like
objImpRep.Print ,,1
after the OpenReport one
I usually add these lines after the open report
Set objImpRep = objImpApp.ActiveDocument
objImpRep.RetrieveAll
just in case the report has had the automatic retrieval removed.
I've changed the application visible to false and added the
report retrieval all line. Am still getting the "Server Busy" dialog box, with the message "This action cannot be completed because the [file name] is not responding"
1hrllabs,
that message just means that the script (macro) is running - in your case it means impromptu is still retrieving and formatting data. The macro will become visible and control return to the script editor when it has finished (or has reached an error).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.