|
-
Nov 25th, 2008, 01:25 AM
#1
Thread Starter
New Member
Crystal Reports Excel Format Option Problem
Hi guys, I am developing an application where i am using vb6 and crystal reports. Crystal reports has this export functionality to any format particularly excel. Can somebody help me if i could set the default excel format options and not showing the dialog box to the user? I only want them to see the 'save as' dialog box for excel file. Thank you in advance
-
Nov 25th, 2008, 12:46 PM
#2
Re: Crystal Reports Excel Format Option Problem
Last edited by jggtz; Nov 25th, 2008 at 12:50 PM.
-
Nov 25th, 2008, 12:49 PM
#3
Re: Crystal Reports Excel Format Option Problem
Post Crystal Reports version and how are You calling the Crystal Reports engine in VB ( OCX or RDC or API ? )
But , yes, it can be solve with VB code...
-
Nov 25th, 2008, 07:34 PM
#4
Thread Starter
New Member
Re: Crystal Reports Excel Format Option Problem
Hi, Thanks for replying. I am using Crystal Report version 10. In my VB code, i used CrystalActiveXReportViewer. This is my code to generate the report:
Dim oApp As CRAXDRT.Application
Dim oReport As CRAXDRT.Report
Dim oRs As New ADODB.Recordset
oRs.Open "myTable", ConnectionManager.DBConnection, adOpenForwardOnly, adLockReadOnly, adCmdTable
Set oApp = New CRAXDRT.Application
Set oReport = oApp.OpenReport(strReportPath & "\myReport.rpt", 1)
oReport.Database.SetDataSource oRs, 3, 1
crvMyCRViewer.ReportSource = oReport
crvMyCRViewer.ViewReport
Thanks...
-
Nov 25th, 2008, 10:12 PM
#5
Re: Crystal Reports Excel Format Option Problem
Try a little with :
Code:
With oReport.ExportOptions
.DestinationType = crEDTApplication
.FormatType = crEFTExcel97
.DiskFileName = "SomeFileName.xls"
End With
oReport.Export False
It's not neccesary to preview the report.
There are more properties, methods and events related inside .ExportOptions
Good luck
JG
Last edited by jggtz; Nov 25th, 2008 at 10:16 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|