Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » array variable in BIRT report
array variable in BIRT report [message #1775934] Wed, 08 November 2017 11:56
Andreas Plette is currently offline Andreas PletteFriend
Messages: 1
Registered: November 2017
Junior Member
Hi,

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:
    listOfUserIds = [];

  • 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
listOfUserIds.add("xxx");

or
listOfUserIds.push("xxx");

but this also doesn't work.

A couple of questions:

  1. Is there any more detailed documentation / example how variables (especially array) can be used in BIRT?
  2. How can I achieve what I described above using an array variable?
  3. Is there any other alternative to achieve what I described?

BR, Andreas
Previous Topic:Memory Issues with Spudsoft Emitter when extracted with Styles & charts
Next Topic:Library masterpage only on the first page
Goto Forum:
  


Current Time: Sun May 27 03:05:39 GMT 2018

Powered by FUDForum. Page generated in 0.01771 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top