How to make a Crystal Report

How to make a Crystal Report in asp.net programming:

In Asp.net programming Crystal report is a way of representation of of printing form or document.
we create a report when we need to print a document in Asp.net programming .
here we discus some easy step by which you create a report in Asp.net programming  -as fallaws:


1.first open .Net IDE 
Then file->new web site >give the name of web site.

2.go rojet menu and and a new dataset .
     1. right click and add new table 
         right click on table and add column .
           double click on column and give name .
              as column which are you want to show in crystel report.
3.if the crystal report is instead in your .net the add if not then instal by internet
      design report ,report have 6 parts,page header,report header ,report content footer,page footer
         now go to data field and add field .


After completion of these steps you have a report with connected to data base .now you need a .Aspx form in which you add report .and in this .aspx from you want to data base connection and sql query by which you give the data to report .

5.So add a new web form in web site add access the report .

we give you as very semple example 

Steps of making a crystal Report in asp.net:


1. Add a dataset form.
1.1 add table in dataset form.
1.2 right click on table and add column in table .
      Then
2.1 Add crystal report form in project….
2.2 drag and drop column in details section of report. And deign report as u like …..Header and footer section …
2.3  preview report. If the record is display then it is correct.
     Then
3.1 Add a new form (web form)in project in which u want to show the crystal report.
3.2 Add following name space in web form ..

using System.Data;
using System.Data.SqlClient;
using CrystalDecisions.CrystalReports;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.ReportSource;

3.3 take Crystal viewer and Crystal source ….in web form.
Make the object of report Document  as like …….

ReportDocument _doc;


3.5 now bind data set to crystal report code is here .

  if (ds.Tables[0].Rows.Count > 0)
           {
               _doc = new ReportDocument();
               _doc.Load(Server.MapPath("MyReport.rpt"));
               _doc.SetDataSource(ds.Tables[0]);
               CrystalReportViewer1.ReportSource = _doc;
           }

Run page ……………..

 



Asp.net Controls And Examples with code :