Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » 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] Fri, 25 April 2014 02:40 Go to next message
Christopher Westfall is currently offline Christopher WestfallFriend
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 14:31 Go to previous message
donino donino is currently offline donino doninoFriend
Messages: 183
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: Thu Apr 25 00:10:02 GMT 2024

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

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

Back to the top