Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » getting Data Element value in onCreate event(getting Data Element value in onCreate event and assign to a global variable)
getting Data Element value in onCreate event [message #777893] Wed, 11 January 2012 05:49 Go to next message
Madhana Gopal is currently offline Madhana GopalFriend
Messages: 2
Registered: January 2012
Junior Member
Hi All,

I am new to Eclipse BIRT. I want to get the data element value in onCreate event of this element and assign to a global variable. Also i would like to access the value of this global variable in beforeRender event of the Report.

I have tried several ways but no luck.

Please help me out.

Thanks & Regards
Madhan
Re: getting Data Element value in onCreate event [message #778400 is a reply to message #777893] Wed, 11 January 2012 17:31 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

If you are previewing in the designer the beforeRender event will fire
before the oncreate events for data elements. If you preview using the
web viewer it will fire like you want it to. In the oncreate use:

reportContext.setGlobalVariable("myvar",this.getValue());
or
reportContext.setPersistentGlobalVariable("myvar",this.getValue());

and in the beforeRendering

var tst = reportContext.getGlobalVariable("myvar");
or
var tst = reportContext.getPersistentGlobalVariable("myvar");

See :
http://www.eclipse.org/birt/phoenix/deploy/reportScripting.php

for details on event order.

Jason


On 1/11/2012 12:49 AM, Madhana Gopal wrote:
> Hi All,
>
> I am new to Eclipse BIRT. I want to get the data element value in
> onCreate event of this element and assign to a global variable. Also i
> would like to access the value of this global variable in beforeRender
> event of the Report.
>
> I have tried several ways but no luck.
>
> Please help me out.
>
> Thanks & Regards
> Madhan
Previous Topic:Dynamic watermarks using parameters
Next Topic:Text Overflow to another cell
Goto Forum:
  


Current Time: Sat Apr 20 02:55:37 GMT 2024

Powered by FUDForum. Page generated in 0.02842 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top