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

Impromtu saving as PDF script

Status
Not open for further replies.

Rick25

Programmer
Jan 27, 2006
1
US
I am trying to save a report as a PDF. I keep recieving cannot convert - Error. Any help would be appriecated.

I am currently using Impromtu 7.3


Set objImpApp = CreateObject("Impromptu.Application")
objImpApp.Visible True
objImpApp.OpenCatalog _
"C:\Program Files\Cognos\Nexen51.cat", "creator"

Set objImpRep = _
objImpApp.OpenReport("C:\Documents and Settings\ghackel\Desktop\Customer Backlog Report.imr", rep(x))

Set objImpPDF = objImpRep.PDFFile("C:\Documents and Settings\ghackel\Desktop\Customer Backlog Report.imr", true)

objImpRep.PDFFile("C:\Documents and Settings\ghackel\Desktop\report4.pdf")

objImpPDF.Save
objImpRep.CloseReport

objImpApp.Quit
Set objImpApp = Nothing
Set objImpRep = Nothing
 
Rick

On the basis that you defined your objects in an unquoted section of code,
remove
Code:
Set objImpPDF = objImpRep.PDFFile("C:\Documents and Settings\ghackel\Desktop\Customer Backlog Report.imr", true)

objImpRep.PDFFile("C:\Documents and Settings\ghackel\Desktop\report4.pdf")

and substitute
Code:
   Set objImpPDF = objImpRep.PublishPDF
   objImpPDF.Publish "C:\Documents and Settings\ghackel\Desktop\report4.pdf"


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

Part and Inventory Search

Sponsor

Back
Top