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)
find element via script onrender()
superbeda
<p>Hello,</p>
<p>I try to use this function</p>
<p>reportContext.getDesignHandle().findElement("39").text = "test"</p>
<p> </p>
<p>to set dinamically text but it doesn't work and I have this error:</p>
<p> Cannot set property "text" of null to "test".</p>
<p> </p>
<p> </p>
<p>Who can help me?</p>
<p>I attached the example report</p>
<p> </p>
<p>Thanks</p>
Find more posts tagged with
Comments
mwilliams
I'm sure it's just the sample, but in your sample, you just need to do this.text = "test".<br><br>Since that's probably not what you're trying to do, can you explain your goal a little more?<br><br>FWIW, to access an element by it's ID, you'd use getElementById(39). However, it won't work plugged into your script above.<br><br>Let me know. Thanks.
superbeda
<p>Hi Michael,</p>
<p>thank you for the answer. I resolved it inserting the code in the beforeFactory event. My goal is to drop an element when reportContext.getOutputFormat = 'pdf', but when I run my report the element is dropped in html format also.</p>
mwilliams
What is your BIRT version? When you say HTML, are you meaning the viewer? Or the single page html output?
superbeda
<p>I'm using Actuate BIRT Designer Professional Version: 3.7.2 Build Id: 20130129<br>
I'm using the web viewer</p>
mwilliams
Hiding using the visibility property won't work for you? Let me see if I can find something else.
superbeda
<p>I tried it, but when I hidden an element remains a white space.<br>
See the attached report.</p>