|array variable in BIRT report [message #1775934]
||Wed, 08 November 2017 11:56
| Andreas Plette
Registered: November 2017
I have a report containing two tables. The first table prints a list of records containing references to "user ID's", e.g. "user ID'" 1 and 4.
The second table should print the list of users excluding those which have been referenced in the first table, so assuming I have users with ID's 1 to 5 I only want to print 2, 3 and 5.
I was thinking about using an array variable in the report, then filling the array while generating the first table with the referenced "user ID's" and finally while generating the second table I would need to check for each record whether the "ID" of the user record is included in the array variable.
What I tried so far:
- I declared a variable in the "initialize" script using:
- On the Detail row of the first table I put the following "onRender" script (also tried "onCreate"):
arrLength = listOfUserIds.length;
listOfUserIds[arrLength] = "xxx";
(Instead of the string "xxx" I would like to insert the "id" column but I'm still "debugging".)
When running the report I get an error "TypeError: Cannot read property "length" from null (<inline>#1)".
I also tried adding elements to the array using
but this also doesn't work.
A couple of questions:
- Is there any more detailed documentation / example how variables (especially array) can be used in BIRT?
- How can I achieve what I described above using an array variable?
- Is there any other alternative to achieve what I described?
Powered by FUDForum
. Page generated in 0.01305 seconds