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!

Error 440 Export destination file cannot be opened 1

Status
Not open for further replies.

stewm

MIS
Oct 10, 2003
171
CA
I'm getting an annoying peice of code that refuses to work with me. I'm trying to save a simple report out to a .csv without any luck.

I'm getting Error: 440 Export destination file cannot be opened. The path is correct. I even tried just sending it to c:\ and still nothing. What could be the cause?

Dim objImpromptuApp as Object
Dim objImpromptuRep as Object

Set objImpromptuApp = CreateObject("CognosImpromptu.Application")
objImpromptuApp.Visible True
objImpromptuApp.OpenCatalog _
"F:\Reports\pkgsale.cat", _
C_BATCH_ID, _
C_BATCH_PW, _
C_BATCH_DB_ID , _
C_BATCH_DB_PW

Set objImpromptuRep = objImpromptuApp.OpenReport ("F:\Reports\Customer.imr",W8_Parm)
objImpromptuRep.Export "F:\Reports\Customer.csv", "x_ascii.flt"

objImpromptuRep.CloseReport
objImpromptuApp.CloseCatalog
Set objImpromptuApp = Nothing

Any suggestions? Thanks,


Mark Stewart
Senior Analyst
Consultants Club Corp.
Windsor, Ontario
Canada
 
Mark,

In general this error only appears when the file cannot be written. Reasons include:
directory invalid
no OS write permissions
file already exists (kill file before writing!)

From what you've said, I would think only the last cause might be involved.

Dave G.



The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data"
[pc2]
Want good answers? Read FAQ401-2487 first!
 
Turns out I'm not a part of the Windows group that you need to be in order to write to that folder.

Mark Stewart
Senior Analyst
Consultants Club Corp.
Windsor, Ontario
Canada
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top