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)
Dynamic Y Series Grouping in Bar Chart
HeSchag
Hello Community,
I have some troubles to find the right syntax for dynamically changing the "Optional Y Series Grouping" in charts. I tried to sum up the use case in the enclosed report-design-file.
Any help is welcome.
Thanks in advance,
Herbert
Those are the JavaScript-lines, where I would need some help. (To be used in "Optional Y Series Grouping")
// TEST 1 - works as expected
if ( true )
{ data["COUNTRY/COUNTRY"];
}
// TEST 2 - results in Exception ("Error happened while running the report")
if ( 1 != 1 )
{ data["COUNTRY/COUNTRY"];
}
else
{ data["OFFICECODE/OFFICECODE"];
}
// TEST 3 - "target code", same result as TEST 2
var a = params["Grouping"].value;
if (a.equals('Country'))
{ data["COUNTRY/COUNTRY"];
}
else if (a.equals('Office'))
{ data["OFFICECODE/OFFICECODE"];
}
PS: Using BIRT 2.6.1
Find more posts tagged with
Comments
HeSchag
For some reason it works, when i don't use a cube.
Fine for me ...