Article
    C#
    ADO.Net
    .NET
    ASP.Net & Web Forms
    Custom Controls
    Web Development
    Exception Handling
    XML
    Database
    Security in .Net
    Testing
    Web Services
    Windows Services
    Windows Controls
    WCF
    AJAX
    WPF
    XAML
    Reporting
    Setup
    VB.Net
    LINQ
    JQuery
    SilverLight
    JavaScript
    HTML5
    Crystal Report
    Cloud Computing
    Share Point
    Visual C++
    MVC
    Android
    PHP
    Java
    HTML
    WordPress
    Joomla
    Products
    Drupal
    Windows Phone
    JSON
    LightSwitch
    iPhone/iPad
    Ruby on Rails
    IIS 7
    Windows 8
    CSS/CSS3
    Excel
    MS Access
    Shortcut Keys
    Visual SourceSafe
    Team Foundation Server
    API(s)
    Sencha-Touch
    Single Page App
    Bootstrap
Follow Us
Follow _MindStick_ on Twitter View MindStick Software's LinkedIn profile View MindStick Software's Facebook profile
Top Contributor
Advertisement
Advertise with Us
Mindstick
Article Article  Forum Forum  Blog Blog  Quiz Quiz  Beginner Beginner  Careers Careers  Contact Contact  Login Login  
Home | Product | Services | About Us | Interview | DeveloperSection | Submit an Article | Submit Blog

Home >> ASP.Net & Web Forms >> CrystalReportViewer Control in ASP.Net
CrystalReportViewer Control in ASP.Net
CrystalReportViewer Control in ASP.Net


by John Smith on 12/3/2010 9:59:53 PM

Views: 7512       Comments: 0

CrystalReportViewer Control in ASP.Net

Crystal Reports is the standard reporting tool for Visual Studio .NET used to display data of presentation quality.

Steps to generate report using CrystalReportViewer

Drag and drop CrystalReportViewer

CrystalReportViewer Control in ASP.Net

Add DataSet

CrystalReportViewer Control in ASP.Net

 

Click add

CrystalReportViewer Control in ASP.Net

Click on server explorer

Drag and Drop table

CrystalReportViewer Control in ASP.Net

 

Now add CrystalReport

CrystalReportViewer Control in ASP.Net

Click add

CrystalReportViewer Control in ASP.Net

Click  Ok

CrystalReportViewer Control in ASP.Net

Expand create ProjectData

CrystalReportViewer Control in ASP.Net

Expand AD.NET Datasets and select table and then click next

CrystalReportViewer Control in ASP.Net

Click highlighted array to select field and click next

CrystalReportViewer Control in ASP.Net

Click next

CrystalReportViewer Control in ASP.Net

Click next

 

 

CrystalReportViewer Control in ASP.Net

Click finish

protected void Page_Load(object sender, EventArgs e)

{

//To instantiate a ReportBuilder, you must provide the ReportDocument to be built.

ReportDocument ReportDocument1 = new ReportDocument();

//Loading Crystal Report to Report Object

reportDocumentObj.Load(Server.MapPath("~/CrystalReport.rpt"));

//Creating instance of Data Table created earlier.

DataSet1.regformDataTable dt = new DataSet1.regformDataTable();

DataSet1TableAdapters.regformTableAdapter da = new DataSet1TableAdapters.regformTableAdapter();

//Filling data table

da.Fill(dt);

//Setting Data Source of Report Document.

ReportDocument1.SetDataSource((DataTable)dt);

//Assigning object of ReportDocument to Crystal Report as ReportSource

CrystalReportViewer1.ReportSource = ReportDocument1; 

}

// Use namespace CrystalDecisions.CrystalReports.Engine;

Now Report is generated.

CrystalReportViewer Control in ASP.Net

Report Abuse Form
Reason:    
 

Title :
Comment :
Text ColorBackground Color
BoldItalicUnderline
LeftCenterRightJustify
Ordered ListBulleted List
IndentOutdent
Horizontal Rule
SubscriptSuperscript
HyperlinkImage
Design ModeDesign
View HtmlHtml
     
 
Latest Article by John SmithRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Latest BlogsRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Top Viewed ArticlesRSS Feed
    
    
    
    
    
    
    
    
    
    
Top Viewed BlogsRSS Feed
    
    
    
    
    
    
    
    
    
    
Latest Interview QuestionsRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Total Online Users: 3727
Advertisement
MindStick SurveyManager
Advertise with Us
  
Copyright © 2014MindStick. All Rights Reserved.