| Using report variable to pass data from outer to inner nested data set [message #1015947] |
Mon, 04 March 2013 06:46  |
Robert Mark Bram Messages: 20 Registered: July 2009 |
Junior Member |
|
|
Hi All,
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.
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:
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]
Whereas I would expect to see this:
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]
I have attached my (fully self contained) example report. Or you can see it here: http://pastebin.com/aDq0H4ns
The key idea is that in the outer data set's fetch, I set the report variable:
And the inner data set's fetch will grab it:
values = vars["values"].iterator();
and the inner data set's fetch will take data from the report variable:
row["value"] = values.next();
Thanks for any assistance!
Rob
[Updated on: Mon, 04 March 2013 07:05] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01765 seconds