Create a variable map in BIRT

0

I have a created report, where to assign headers to a table, I would save many lines of code having a map, the problem is that it always fails to create this variable. I have even tried to create them as they come in internet examples, in case it was my fault, some fault I was not seeing, but they do not work either. I have the following map at the moment:

var animal = {};

animal['cat'] = { sound: 'meow', age:8 };
animal['dog'] = { sound: 'bark', age:10 };
animal['bird'] = { sound: 'tweet', age:2 };
animal['cow'] = { sound: 'moo', age:5 };

Even trying other combinations, other assignments on the map, declaring it differently, etc. I always get the same error:

A BIRT exception occurred. See next exception for more information.
Java class "java.lang.Object" has no public instance field or method named "sound". (/report/data-sets/script-data-set[@id="121"]/method[@name="fetch"]#13)

Searching the internet I have seen that in BIRT the behavior of javascript is different from pure. Is it possible that BIRT does not accept maps?

    
asked by Angel Gonzalez Pena 29.10.2018 в 09:49
source

0 answers