Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Issue - child data sets
shadraq
<p>Version: 431</p>
<p>Type: Open Source</p>
<p> </p>
<p>I’m building a simple BIRT report and am running into an issue I was hoping you might be able to help with.</p>
<p> </p>
<p>I have a report that I'm trying to pass a parameter from the parent dataset to the child dataset. </p>
<p> </p>
<p><strong>Parent </strong>- Select wonum, description, assetnum from workorder; </p>
<p><strong>Child </strong>- Select workhist from assetworkhistory where assetnum = rows[0]["assetnum "]</p>
<p> </p>
<p>I also have my report grouping on wonum. </p>
<p> </p>
<p>My problem lies in that if I have multiple work orders (wonum) the child will only display data from the first work order. </p>
<p> </p>
<p>So if I have 12 work order numbers, each printed work order will only display the asset information for the first work order. </p>
<p> </p>
<p>I’m sure I’m missing something small and simple – any ideas?</p>
Find more posts tagged with
Comments
shadraq
<p>Answering own question with a better problem statement. Hope others find this helpful.</p>
<p> </p>
<div><strong>Example</strong></div>
<ul><li>My report where parameter is workorder.wonum in('WO104638','WO104742')</li>
<li>My report main dataset returns all data (two rows)</li>
<li>My main report table is grouped by workorder.wonum + workorder.siteid so I can ensure the right data goes with the right data sets</li>
<li>My child data set wants to show all assets found inside multiassetlocci for those work orders
<ul><li>​WO104638 contains 6 assets</li>
<li>WO104742 contains 3 assets</li>
</ul></li>
<li>Child: Multiassetlocci data set</li>
</ul><pre class="_prettyXprint _lang-">
var wonum = rows[0]["wonum"]
sqlText = "select assetnum, location from multiassetlocci where recordkey = '"+wonum+"' ";
</pre>
<ul><li>This allows me to pass values returned from my main dataset into my child datasets</li>
<li>If everything else is left to its own, WO104638 and WO104742 will both return(incorrectly) 6 assets because of the cached value issue</li>
</ul><div><strong>To fix the Cached Value issue</strong></div>
<ul><li>Select child data set</li>
<li>Property Editor (tab) ïƒ Properties (tab) ïƒ Advanced (row option)</li>
<li>Find property “Needs cache for data-engineâ€</li>
<li>Change value to FALSE</li>
</ul><div> </div>
<div><strong>Source</strong>: <a data-ipb='nomediaparse' href='
http://www.eclipse.org/birt/phoenix/project/notable4.2.php#jump_11'>http://www.eclipse.org/birt/phoenix/project/notable4.2.php#jump_11</a>
; </div>