Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » How do I initialize a Multi-dimensional Array in BIRT?(The values do not seem to be set properly)
How do I initialize a Multi-dimensional Array in BIRT? [message #1313783] Thu, 24 April 2014 22:40 Go to next message
Christopher Westfall is currently offline Christopher Westfall
Messages: 1
Registered: April 2014
Junior Member
I'm trying to create a multi-dimensional array (with only two dimensions) in a fetch method to collect rows as they come in and perform some complex calculations. This works fine for single dimensional arrays, but if I try to use a multi-dimensional array, it seems that the second dimension is being ignored.

For example, if I use the following code:

multiArray      = [];
multiArray[0,0] = 1;
scriptLogger.info("    ======== multiArray[0,0]: " + multiArray[0,0]);
scriptLogger.info("    ======== multiArray[1,0]: " + multiArray[1,0]);
scriptLogger.info("    ======== multiArray[2,0]: " + multiArray[2,0]);
scriptLogger.info("    ======== multiArray[99,0]: " + multiArray[99,0]);


The log shows 1 as the value for multiArray[0,0] all the way through multiArray[99,0]. I would like to see null or zero for all of them *except* [0,0].

What am I doing wrong? :/

Re: How do I initialize a Multi-dimensional Array in BIRT? [message #1316465 is a reply to message #1313783] Sat, 26 April 2014 10:31 Go to previous message
donino donino is currently offline donino donino
Messages: 162
Registered: July 2011
Senior Member
Here is an example:


var myarray=[];
myarray[0]=[];
myarray[0][0]="MyValue2Dim";

var readFromArray = myarray[0][0];
Previous Topic:Barcode
Next Topic:BIRT designer questions
Goto Forum:
  


Current Time: Fri Aug 22 11:43:06 EDT 2014

Powered by FUDForum. Page generated in 0.01589 seconds