Quantcast
Channel: Crystal Reports
Viewing all articles
Browse latest Browse all 1507

showing only one record

$
0
0

I want to show a crystal report on a button click event using data table by passing datatable data to xml but im getting a problem in the report i can see only one record  in the report.

xml file is showing all data when button is clicked but the report only 1 :(

below is the click event code.

protected void btnprint_dest_Click(object sender, ImageClickEventArgs e)
{
ReportDocument rptDoc = new ReportDocument();

dt2.WriteXml(Server.MapPath("dest_rep.xml"), XmlWriteMode.WriteSchema);

rptDoc.Load(Server.MapPath("dest_rep.rpt"));
rptDoc.FileName = Server.MapPath("dest_rep.rpt");
Session["rptDoc"] = rptDoc;
CrystalReportViewer1.ReportSource = rptDoc;
CrystalReportViewer1.DataBind();

}


Viewing all articles
Browse latest Browse all 1507