Home
Analytics
BIRT Report / Outline / Variables
jjfeigal
I am using free BIRT 2.5.2 in Eclipse.
The Outline view/perspective for a BIRT report has a selection for "Variables" following "Report Parameters" and preceding "Body". From "Help" in the BIRT report designer, I've read that "Variables" were added in BIRT 2.5. A new variable can be a "Report Variable" or a "Page Variable". The "Help" for "Variables" went into quite a bit of detail to describe how to define and manipulate a "Page Variable", but there didn't seem to be as much information about a "Report Variable".
During the development of a recent report, in this forum I was introduced to persistent global variables which are set by reportContext.setPersistentGlobalVariable() and are accessed by reportContext.getPersistentGlobalVariable().
How does a "Report Variable" differ from a persistent global variable? Are they interchangeable? Is there any additional "Help" information about a "Report Variable" available?
Find more posts tagged with
Comments
mwilliams
Hi jjfeigal,
The main difference is that a report variable is evaluated when the report is complete and a page variable is evaluated at the time the page is written. I'm not 100% sure on the differences between a report variable and a persistentGlobalVariable. I'll check into it and let you know.
mwilliams
Alright, here's a little more info. Page and Report variables were originally designed just for use in master page auto texts. In 2.5.2, they were allowed for use in the body of the report, but their main advantage still seems to be that they can be used in an auto text which can be updated on the master page while a variable in a standard text element in the master page cannot. As for PGV's, they can essentially be used in the same fashion in the body of your report, only they require some scripting to parse string values back to integers as they store only string values. This is what my understanding is at this point.
Let me know if you have questions.
giridhar
Hi friends,
Good day to you.my name is giridhar.
iam new to birt.i have a good knowledge on report items like table,list etc.
i don't know where should i use the java script in birt.
how can i use the java script in birt.what is the purpose of using java script in birt.please explain me.
mwilliams
Script can be used to do pretty much anything you can do with the designer, in a dynamic fashion. It also allows you to extend beyond what BIRT does out of the box and use external java and javascript. The simple answer is that you can do just about anything you want, in script.
Do you have any more specific things you're looking to do?