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

Weird Export Problem

Status
Not open for further replies.

arkbaby

IS-IT--Management
Jan 13, 2003
5
0
0
IE
Whenever I run the below code I get a run-time error.
'-2147190908 (80047784)':
Failed to export the report.

But if I change crxReport.Export (False) to
crxReport.Export (True)
and do everything by mouse it works.
As far as I can see all the variables are correct.
ie the profile,username,password etc etc

Any idea's ?

------------------------------------------------------------

Private Sub Form_Load()
Dim crxReport As CRAXDRT.Report
Dim crxapplication As New CRAXDRT.Application
Set crxReport = crxapplication.OpenReport("D:\Projects\VB\Current Source\Report\machine list alt.rpt")
With crxReport.ExportOptions
.DestinationType = crEDTEMailMAPI
.MailPassword = "jblogs87Ynh@"
.MailUserName = "jblogs" 'Also tried Domain\jblogs
.MailMessage = "Exported Report"
.MailSubject = "Weekly Document Status Report"
.MailToList = "Joe Blogs"
.ExchangeProfile = "Joe"
.FormatType = crEFTPortableDocFormat
.PDFExportAllPages = True
.DiskFileName = "c:\TEMP.pdf"
End With
crxReport.DiscardSavedData
crxReport.Export (False)
End Sub

------------------------------------------------------------

References:
Visual Basic for Applications
Visual Basic runtime objects and procedures
Visual Basic objects and procedures
OLE Automation
Microsoft ActiveX Plugin
Microsoft ActiveX Data Objects Library
Crystal Reports 9 ActiveX Designer Run Time Library
 
I wrote this to user Jenniferlynn.
Try this link:

I had similar problem: can't export report to .rtf file.
It also gives problem when you export to PDF, but works fine for excel.
You have to check .dll registration and if you create setup package make sure you include all .dll files.

It works for me. Good luck. Let me know if it works for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top