Hi :eek2:
In Crystal report i am able to export the report in excel format by export option and then open the file. but i want to flash the report in excel and don't want to show the report in viewer and then export
Can Somebody ? ?? ?
:wave:
Printable View
Hi :eek2:
In Crystal report i am able to export the report in excel format by export option and then open the file. but i want to flash the report in excel and don't want to show the report in viewer and then export
Can Somebody ? ?? ?
:wave:
Ok, here is an example I wrote for CR 8.5 but should stil be similar on newer versions.
VB Code:
Option Explicit 'Add a reference to CR xx.x ActiveX Designer Runtime Library Private Sub Form_Load() Set crApp = New CRAXDRT.Application Set oReport = New CRAXDRT.Report Set oReport = crApp.OpenReport(App.Path & "\MyReport.rpt") oReport.DiscardSavedData oReport.Database.SetDataSource oRs 'oRs is just an ex. of an ADO recordset for the datasource oReport.ExportOptions.DestinationType = crEDTDiskFile oReport.ExportOptions.FormatType = crEFTExcel80 oReport.ExportOptions.DiskFileName = "C:\MyReport.xls" oReport.Export True End Sub