Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
How to pass a collection from a dataset to another dataset
jgisler
Hello,<br />
<br />
Using BIRT 2.6.1.<br />
<br />
We use Scripted Data Sources. I have a data set with a bunch of Integer and String fields and one with a java.util.List of names. The report uses crosstabs to generate a grid where the crosstab cells contain a List of names from the java.util.List <br />
<br />
I am attempting to do this by setting an input parameter on the inner dataset which corresponds to the field on the outer dataset's java.util.List field.<br />
<br />
Now when I log the outer dataset's fetch method, I can see that BIRT's JS engine understands that the list of names is a collection and prints them as an array <br />
<br />
<p class='bbc_indent' style='margin-left: 40px;'>[Name1, Name2, Name3]</p>
<br />
However, when I log the open method of the inner dataset, the input parameter always displays as null.<br />
<br />
Here is the open method code.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
studentLabels = inputParams['studentLabels'];
java.lang.System.out.println( "\n\t >>> " + studentLabels );
studentLabelsIterator = null;
if( !studentLabels.isEmpty() ) {
studentLabelsIterator = studentLabels.iterator();
}
</pre>
<br />
Is there any way to pass a collection from an outer dataset to a inner/dependent dataset?
Find more posts tagged with
Comments
mwilliams
So, you have an outer dataSet that has a list of values and you want the inner dataSet to contain all the values that pertain to the values in this list? Or is the outer dataSet's list separated and grouped and you want the inner dataSet to correspond to the current value from the outer list? Or is it none of the above? Let me know.
jgisler
"an outer dataSet that has a list of values and you want the inner dataSet to contain all the values that pertain to the values in this list"<br />
<br />
This.<br />
<br />
In other words, each row of the outer set has a collection of names. These names are populating an inner dataset bound to a list element inside each of the measure cells of the crosstab.<br />
<br />
<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="71984" data-time="1294366905" data-date="06 January 2011 - 07:21 PM"><p>
So, you have an outer dataSet that has a list of values and you want the inner dataSet to contain all the values that pertain to the values in this list? Or is the outer dataSet's list separated and grouped and you want the inner dataSet to correspond to the current value from the outer list? Or is it none of the above? Let me know.<br /></p></blockquote>