VB.NET-INFORMATIONS.COM


Home  

VB.NET Crystal Reports Tutorials

Email a Crystal Reports from VB.NET

Vb.Net Help      Crystal Reports      Excel


For Email a Crystal Reports , we have to export the Crystal Reports in any of the File Format available in Crystal Reports and then Email it.

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 use the tutorial Export Crystal Report to PDF file . So before we start this section please take a look at the tutorial Export Crystal Report to PDF file

After export the Crystal Reports as a PDF file , the next step is to email that file . For that here we are using System.Web.Mail . We have to provide the necessary information to configuring SmtpMail client and send the exported file as attachment .

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

Imports CrystalDecisions.Shared

Imports System.Web.Mail

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.

Before you run this programme , you have to provide the necessary SMTP informations , that is your HOSTNAME , FROM ADDRESS and TO ADDRESS to the SMTP client.

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
VB.NET Crystal Reports Export to Excel
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

Search here for more Vb.Net Source Code :



    Categories

    HOME
    VB.NET

 
 
 
   













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