<?xml version="1.0" encoding="UTF-8"?> <root> <supplier> <s_code>1</s_code> <net_weight>100</net_weight> <rate>100.00</rate> </supplier> <supplier> <s_code>2</s_code> <net_weight>500</net_weight> <rate>150.00</rate> </supplier> </root>
DataSet reportData = new DataSet(); reportData.ReadXml("http://192.168.1.10/test/data.xml"); DataSet dset = new DataSet1(); dset.Tables[0].Merge(reportData.Tables[0]); ReportDocument report = new CrystalReport1(); report.SetDataSource(dset.Tables[0]); reportViewer.ViewerCore.ReportSource = report;
<?xml version="1.0" encoding="UTF-8"?> <root> <supplier> <s_code>1</s_code> <net_weight>100</net_weight> <rate>100.00</rate> <items> <item_code>SKU001</items_code> <price>100</price> </items> <items> <item_code>SKU002</items_code> <price>200</price> </items> </supplier> <supplier> <s_code>2</s_code> <net_weight>500</net_weight> <rate>150.00</rate> <items> <item_code>SKU001</items_code> <price>100</price> </items> </supplier> </root>
System.Data.DataSet ds = new System.Data.DataSet(); ds.ReadXml("xml filename");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)