Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to arrange this data in a crystal report?
    primarykey
    data
    text
    <p>i have a xml data like this</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;root&gt; &lt;supplier&gt; &lt;s_code&gt;1&lt;/s_code&gt; &lt;net_weight&gt;100&lt;/net_weight&gt; &lt;rate&gt;100.00&lt;/rate&gt; &lt;items&gt; &lt;s_code&gt;1&lt;/s_code&gt; &lt;item_code&gt;SKU001&lt;/items_code&gt; &lt;price&gt;100&lt;/price&gt; &lt;/items&gt; &lt;items&gt; &lt;s_code&gt;1&lt;/s_code&gt; &lt;item_code&gt;SKU002&lt;/items_code&gt; &lt;price&gt;200&lt;/price&gt; &lt;/items&gt; &lt;/supplier&gt; &lt;supplier&gt; &lt;s_code&gt;2&lt;/s_code&gt; &lt;net_weight&gt;500&lt;/net_weight&gt; &lt;rate&gt;150.00&lt;/rate&gt; &lt;items&gt; &lt;s_code&gt;2&lt;/s_code&gt; &lt;item_code&gt;SKU001&lt;/items_code&gt; &lt;price&gt;100&lt;/price&gt; &lt;/items&gt; &lt;/supplier&gt; &lt;/root&gt; </code></pre> <p>and this is what i did</p> <ol> <li>Define a dataset and two tables inside it. </li> <li>DataTable1 to store supplier data and DataTable2 to store items data</li> <li>created nested relation between DataTable1 s_code and DataTable2 s_code</li> <li>created a crystal report with dataset and added s_code,net_weight to header section and item_code,price into details section.</li> <li>then i right click on crystal report and selected Report->Selection Expert and set Section paging tab to New page after 1 visible record</li> </ol> <p>this is the code i used to load xml into two tables</p> <pre><code>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; </code></pre> <p>now im receiving 3 pages with supplier data and items in it. but i want to display 2 pages [1 page per supplier and items data relevant to each customer in each page ]</p> <p>any idea what im doing wrong here? what should i do to achieve the output i needed.</p> <p>Regards </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload