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!

error exporting rpt to html using vb and crystal 8.5

Status
Not open for further replies.

yoink

Programmer
Dec 2, 2001
15
AU
Hi everyone,

I'm having difficulties exporting a report as html4.0 from a VB app using .

Whenever I export one particular report (some other reports work okay) to a html file, I get the error "Runtime Error '-2147190908 (80047784): Failed to export the report'. If I export it as a pdf file or word document, it works perfectly. If I change the .Export False to .Export True, it brings up the export dialog box, and I can then continue to export in html format successfully. It's absolutely bizarre.

My code is as follows:

Dim crReport As CRAXDRT.Report
Set crReport = crApplication.OpenReport("c:\test.rpt")

'Export the crystal report to a html file
With crReport
'Get rid of existing data and set export options
.DiscardSavedData
.ExportOptions.DestinationType = crEDTDiskFile
.ExportOptions.HTMLFileName = strPath
.ExportOptions.FormatType = crEFTHTML40

.ReadRecords
.Export False

Any suggestions?

Regards,

Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top