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)
global variables and scope
wwilliams
I am using BIRT 2.3.2 and Eclipse 3.4.2.
What I'd like to do is hide an image after the first page. What I keep running into is everything I try the variable appears to re-initialize. I tried it in the report initialize, beforeFactory (pageFlag =0;).
Elsewhere in the report, I have tried scripting the image control, Grid, header all to no avail.
I am hitting a block wall right now..I must be overlooking something simple.
I have also tried reportContext.set, get, setPersistent etc.
-W
Find more posts tagged with
Comments
thuston
Is the image on the Master Page or in the Layout?
Can you put it in the layout in a way that only prints it on the first page (outside a table)?
wwilliams
It was in the master page, but I moved to the table header and I am still unable to have it only show on the first page.<br />
I'd like it to print once.<br />
What I am seeing is for example is that globalimage is always "once"<br />
I have tried onRendor , onCreate , onPageBreak etc.<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if(reportContext.getPersistentGlobalVariable("globalimage"))==null){
reportContext.setPersistentGlobalVariable("globalimage","once")
}
else {
reportContext.setPersistentGlobalVariable("globalimage","done")
}
</pre>
<br />
It seems like they only get evaluated once as the report runs, I need a toggle once the first page is rendered.