Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Hiding Controls through Scriptin
Migrateduser
Hi All,<br />
<br />
we want to hide controls(images to be specific) based on the dataset.<br />
for example in the below image the check boxes in front of Mr. and Mrs.<br />
are images(as Birt does not provide default CheckBox Functionality)<br />
based on the data sale row["SALUTATION"]='Mr.' only image in front<br />
of Mr. should be shown and the Image in front of the Mrs. should be hidden.<br />
<br />
we tried googled alot.<br />
we tried the below code <br />
<strong class='bbc'>onFetch event of Dataset:</strong><br />
<br />
var SAL= this.getRowData().getExpressionValue("row["SALUTATION"]");<br />
<br />
reportContext.setPersistentGlobalVariable("SAL1", SAL);<br />
<br />
<br />
<strong class='bbc'>beforeRender of rptdesing :</strong><br />
<br />
var SAL2= reportContext.getPersistentGlobalVariable('SAL1');<br />
if(SAL2 == 'Mr.')<br />
{<br />
reportContext.getDesignHandle().getElementByID(65).visibilty= true;<br />
}<br />
else<br />
{<br />
reportContext.getDesignHandle().getElementByID(65).visibilty=false;<br />
}<br />
<br />
Kindly guide us how this could be achieved.
Find more posts tagged with
Comments
There are no comments yet