Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Split is not working in BIRT 2.3.1
Natty77
Hi,
I am migrating the BIRT report from 2.1.0 to 2.3.1.
There are some custom JavaScript which are called to format the TOC. But the split which I am using is not giving me proper length. What I am doing is I have string like (1, 1.1, 1.1.1) which i am spliting on "." and checking the length. If the length is 0 then add 3 mm padding else add padding based on the length here is the code.
var val = row["num"];
splitt = val.split(".");
len = splitt.lenght;
if(len==1) padding = 3;
else if(len == 2) padding = 9;
else if(len == 3) padding = 12;
this.getStyle().paddingLeft = padding + "mm";
This code is in the DataItem's onCreate event.
When I have added some println statments with in the code I found that the len is coming 0 for any value. I even tried to access the value as an array element but it is giving me undefined.
Find more posts tagged with
Comments
mwilliams
Hi Natty77,
This may just be a typo in your post, but the first thing I see is that "length" is misspelled on the line, "len = splitt.lenght;". Figured it was worth mentioning just in case.