private void Form1_Load_1(object sender, EventArgs e)
{
string xmlFilename = "C:\\Project\\XMLCrystalReport\\books.xml";
DataSet newDataSet = new DataSet();
// read the XML document into the DataSet.
newDataSet.ReadXml(xmlFilename);
ReportDocument customerReport = new ReportDocument();
customerReport.Load(@"C:\Project\XMLCrystalReport\collection.rpt");
customerReport.SetDataSource(newDataSet);
crystalReportViewer1.ReportSource = customerReport;
}
No comments:
Post a Comment