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)
Label Visibility Property in BIRT 4.2.0
kpelzer29
I have a report that contains a label. I also have a report parameter named <em class='bbc'>rep_param1</em>. In the Visibility property of the label, I have checked the <em class='bbc'>Hide Element</em> checkbox, selected the <em class='bbc'>For <span class='bbc_underline'>all</span> outputs</em> radio button, and in the Detail section I have javascript similiar to:<br />
<br />
if (params["rep_param1"].value == 'A' || params["rep_param1"].value == 'B')<br />
{<br />
true;<br />
}<br />
<br />
Why do I get the following error message when I run the report in BIRT 4.2.0 and the value of <em class='bbc'>rep_param1</em> equals 'C'?<br />
<br />
<em class='bbc'>The following visibility expression does not evaluate to a legal boolean value: if (params["rep_param1"].value == 'A' || params["rep_param1"].value == 'B') <br />
{<br />
true;<br />
}</em><br />
<br />
I do not receive this error when I run the same report in BIRT 3.7.0.
Find more posts tagged with
Comments
mwilliams
Try putting the else{false;} on there, or just removing the if portion and simply having the condition:
params["rep_param1"].value == 'A' || params["rep_param1"].value == 'B'
This will automatically return true or false if the condition is met or not, rather than you specifying.
From the sounds of your error, that should do it.
kpelzer29
That worked! Thank you!<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="107337" data-time="1342722206" data-date="19 July 2012 - 11:23 AM"><p>
Try putting the else{false;} on there, or just removing the if portion and simply having the condition:<br />
<br />
params["rep_param1"].value == 'A' || params["rep_param1"].value == 'B'<br />
<br />
This will automatically return true or false if the condition is met or not, rather than you specifying.<br />
<br />
From the sounds of your error, that should do it.<br /></p></blockquote>