You must Sign In to post a response.

Show gridview data in crystal report

Hi
I want to show grids data on crystal reports to make one good looking report.
could you give one sample please.


Comments

Author: raj30 Oct 2011 Member Level: Bronze   Points : 2

hi,
you are binding gridview in dataset. that same dataset to pass crystal report

example: i.e (myreport dataset name)
CrystalReportViewer1.ReportSource = myreport;
CrystalReportViewer1.DataBind();

Author: Pawan Awasthi02 Nov 2011 Member Level: Gold   Points : 4

Hai Satish,

To display the grid data to the crystal report,
first you need to add the CrystalReportViewer control and then you create the report as per your contents which you are going to display with its look and feel.

after that in the page load event of the .aspx page where your crystal report view control will be used to load the data, you need to get the dataset of the gridview and load that using the below commands:


CrystalReportViewer1.ReportSource = dsGridView;
CrystalReportViewer1.DataBind();


Hope it will help.