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)
One to Many relashionship display using Script Data Source
Giri
Hi,
I am sending list of JAVA objects, each object has many child components.
Ex. I am sending List of Apps, each app contains many components.
App1 ( -> Component 1, -> Component 2 )
App2 ( -> Component 3, -> Component 4. )
I have to display in report as below.
App1 Component1
<blank> Component2
App2 Component3
<blank> Component4
How do I can achieve using Script data source or data set events.
on Data Set fetch event, I am reading App list and setting application details to row[..].
Thanks in advance
Find more posts tagged with
Comments
thuston
It might be easier to do as two DataSets and nested tables. <br />
Have the component dataset to take the app value as a parameter or filter. <br />
<br />
If you want to script it, you can build an output array like this.<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>for each approw
for each comprow
if approw = comprow
add mergedrow to output</pre>
It is the least efficient, but it is guaranteed to work.<br />
You can improve it by having them both presorted by app value. <br />
Then you can adjust the logic to know when to stop looking at comprows and increment your approw.
Giri
Thanks for the reply. Before reading your reply, I just implemented as you described. I will try Data Set level as you suggested.
Now I have to filter out duplicate Application Row from display in report design, and just display Component details for that row. How do I can filter?
thuston
You don't Filter.
Simply use either the Group Header Cell's Drop Property or the Column's Suppress Duplicates Property.
Giri
Thank you thuston, it worked.