Click here to Skip to main content
15,887,585 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
How can i export crystal report to excel?
Posted
Comments
Richard C Bishop 21-May-13 10:13am    
Ask google.
Am Gayathri 21-May-13 10:42am    
i have tried this

Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button2.Click
Try
Dim CrExportOptions As ExportOptions
Dim CrDiskFileDestinationOptions As New _
DiskFileDestinationOptions()
Dim CrFormatTypeOptions As New ExcelFormatOptions
CrDiskFileDestinationOptions.DiskFileName = _
"c:\crystalExport.xls"
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
End Sub

but i was unable to do this CrExportOptions = cryRpt.ExportOptions
there is no option like ExportOptions .
what could be the reason?

hope u got the question if no plz let me know.
Am Gayathri 22-May-13 3:26am    
is it possible to display values from datareader to crystal report in vb.net
[no name] 21-May-13 10:33am    
If your "question" is a single sentence then chances are that:
1. You have not read the FAQ, http://www.codeproject.com/Articles/64628/Code-Project-Quick-Answers-FAQ
2. You have not described what it is that you are trying to do in sufficient detail
3. You have not described what it is that you have tried to do yourself in sufficient detail
4. You have not described any kind of a problem with your code in sufficient detail
5. You have not done any research at all.
6. All of the above.
Am Gayathri 21-May-13 10:42am    
Dude i cant give my code here cause of some integrity issues.
i have tried this

Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button2.Click
Try
Dim CrExportOptions As ExportOptions
Dim CrDiskFileDestinationOptions As New _
DiskFileDestinationOptions()
Dim CrFormatTypeOptions As New ExcelFormatOptions
CrDiskFileDestinationOptions.DiskFileName = _
"c:\crystalExport.xls"
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
End Sub

but i was unable to do this CrExportOptions = cryRpt.ExportOptions
there is no option like ExportOptions .
what could be the reason?

hope u got the question if no plz let me know.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900