Hi
i have a xml data like this
="1.0"="UTF-8"
<root>
<supplier>
<s_code>1</s_code>
<net_weight>100</net_weight>
<rate>100.00</rate>
<items>
<s_code>1</s_code>
<item_code>SKU001</items_code>
<price>100</price>
</items>
<items>
<s_code>1</s_code>
<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>
<s_code>2</s_code>
<item_code>SKU001</items_code>
<price>100</price>
</items>
</supplier>
</root>
and this is what i did
1. Define a dataset and two tables inside it.
2. DataTable1 to store supplier data and DataTable2 to store items data
3. created nested relation between DataTable1 s_code and DataTable2 s_code
4. created a crystal report with dataset and added s_code,net_weight to header section and
item_code,price into details section.
5. then i right click on crystal report and selected Report->Selection Expert and set Section paging tab to New page after 1 visible record
this is the code i used to load xml into two tables
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]);
dset.Tables[1].Merge(reportData.Tables[1]);
ReportDocument report = new CrystalReport1();
report.SetDataSource(dset);
reportViewer.ViewerCore.ReportSource = report;
now im receiving 3 pages with supplier data and items in it. but i want to display 2 pages [1 page per customer and items data relevant to each customer in each page ]
any idea what im doing wrong here? what should i do to achieve the output i needed.
Regards