ReportDocument reportdocument = new ReportDocument(); reportdocument.Load(Server.MapPath("~/CrystalReport2.rpt")); DataSet1 dsPersonInfo = new DataSet1(); SqlConnection con = new SqlConnection("Data Source=localhost;user id=sa; password=sa;Initial Catalog=test;"); con.Open(); SqlCommand cmd = new SqlCommand("select * from PersonInfo", con); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(dsPersonInfo, "PersonInfo"); con.Close(); reportdocument.SetDataSource(dsPersonInfo); CrystalReportViewer1.ReportSource = reportdocument; CrystalReportViewer1.DataBind();
PersonInfo
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)