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

RTP to Excel

Status
Not open for further replies.

Andrea123

Technical User
May 18, 2009
4
How can I send a RPT to Excel?
I was trying with the following vbs, but it doesn't work, and I prefer to do it with java script
Dim cryRpt As New ReportDocument
cryRpt.Load("F:\VB\CrystalReport1.rpt")
Try
Dim CrExportOptions As ExportOptions
Dim CrDiskFileDestinationOptions As New _ DiskFileDestinationOptions()
Dim CrFormatTypeOptions As New ExcelFormatOptions
CrDiskFileDestinationOptions.DiskFileName = "F:\VB\crystalExport.pdf"
CrExportOptions = cryRpt.ExportOptions
With
CrExportOptions .ExportDestinationType = ExportDestinationType.DiskFile .ExportFormatType = ExportFormatType.Excel .DestinationOptions = CrDiskFileDestinationOptions .FormatOptions = CrFormatTypeOptions
End With
cryRpt.Export()
Catch ex As Exception
MsgBox(ex.ToString)
End Try
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top