Hi All,<br />
<br />
Hoping someone can tell me what is wrong with this report. I am trying to use a nested scripted data set, where the outer data set passes data to the inner data set through a report variable.<br />
<br />
I find that the report isn't acting as I thought it would. It seems as though the report variable is outputting the last value it has for every row. For the below report I am seeing output such as:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
key0
value[9][0]
value[9][1]
value[9][2]
value[9][3]
value[9][4]
key1
value[9][0]
value[9][1]
value[9][2]
value[9][3]
value[9][4]
....
key9
value[9][0]
value[9][1]
value[9][2]
value[9][3]
value[9][4]
</pre>
<br />
Whereas I would expect to see this:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
key0
value[0][0]
value[0][1]
value[0][2]
value[0][3]
value[0][4]
key1
value[1][0]
value[1][1]
value[1][2]
value[1][3]
value[1][4]
....
key9
value[9][0]
value[9][1]
value[9][2]
value[9][3]
value[9][4]
</pre>
<br />
Attaching my (fully self contained) example report failed on this forum, so I pasted the report here: <a class='bbc_url' href='
http://pastebin.com/aDq0H4ns'>http://pastebin.com/aDq0H4ns</a>.<br />
<br />
The key idea is that in the outer data set's <strong class='bbc'>fetch</strong>, I set the report variable:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
vars["values"] = value;
</pre>
<br />
And the inner data set's <strong class='bbc'>fetch</strong> will grab it:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
values = vars["values"].iterator();
</pre>
<br />
and the inner data set's <strong class='bbc'>fetch</strong> will take data from the report variable:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
row["value"] = values.next();
</pre>
<br />
Thanks for any assistance!<br />
<br />
Rob<br />