VB.NET-INFORMATIONS.COM



VB.NET Crystal Reports Tutorials

VB.NET Crystal Reports Export to Excel

VB.NET Crystal Reports Export to Excel

Exporting from Crystal Reports to Excel format , we are using Crystal Reports CrExportOptions . Also we have to set ExcelFormatOptions and ExportFormatType.Excel . In the following example you can see how to export a Crystal Reports as a Excel format file.

All Crystal Reports programming samples in this tutorials is based on the following database (crystaldb) . Please take a look at the database structure before you start this tutorial - Click here to see Database Structure .

In this tutorial we are using our earlier program step by step Crystal Report pull data from database to Crystal Reports . Before we start this section take a look at the step by step Crystal Report in VB.NET .

In the step by step Crystal Report we pull all data from Product table , here now we are exporting that data to a Excel format file.

Select the default form (Form1.vb) you created in VB.NET and drag two buttons (Button1, Button2 ) and CrystalReportViewer control to your form.

Select Form's source code view and import the following :

Imports CrystalDecisions.CrystalReports.Engine

Put the following source code in the button click events

VB.NET Source Code


NOTES:

cryRpt.Load("PUT CRYSTAL REPORT PATH HERE\CrystalReport1.rpt")

The Crystal Report is in your project location, there you can see CrystalReport1.rpt . So give the full path name of report here.

When you run this program you will get the Excel file (crystalExport.xls) in your computer's C:\

VB.NET Crystal Reports Related Contents
Sample Database and tables for Crystal Reports tutorials
Step by Step help for creating a simple Crystal Reports in VB.NET
VB.NET Crystal Reports from multiple tables
VB.NET Crystal Reports String parameter
VB.NET Crystal Reports Integer parameter
VB.NET Crystal Reports Date parameter
VB.NET Crystal Report Load Dynamically
VB.NET Crystal Reports Formula Fields
VB.NET Crystal Reports Summary Fields
VB.NET Crystal Reports Export to PDF
Email a Crystal Reports from VB.NET
Crystal Reports Without Database
Crystal Report from SQL Query String
Dynamic Crystal Reports from SQL Query String
Crystal Reports from XML File
Create a Subreport in Crystal Reports
Create a Subreport in Crystal Reports with Link

VB.NET Related Tpoics
Microsoft .Net Framework Tutorials
VB.NET Language Basics Tutorials
VB.NET Program Flow Control Tutorials
VB.NET Collections Tutorials
VB.NET String Tutorials
VB.NET Files Tutorials
VB.NET Excel 2007 Tutorials
VB.NET Crystal Reports Tutorials
VB.NET Communications Tutorial
VB.NET ADO.NET Tutorial with source code
ADO.NET Data Providers help and Tutorial
VB.NET ADO.NET Dataset Tutorial
ADO.NET DataAdapter and Dataset
VB.NET ADO.NET DataView Tutorial

Search here for more Vb.Net Source Code :


   Categories

    HOME
    VB.NET

 
 
 
   













  |  Home   |  SiteMap   |  About   |
net-informations.com (C) 2008 All Rights Reserved