Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Calculate a row value in a script(Which method on which report element do you use to calculate the value of a column in a row?)
Calculate a row value in a script [message #723636] Fri, 09 September 2011 03:17 Go to next message
Richard  is currently offline Richard Friend
Messages: 7
Registered: September 2011
Junior Member
If you wish to calculate a value to be displayed in each row of a report, based on other values in the row and some other data, which method do you use? To which data element do you attach the script or Java event handler?
Re: Calculate a row value in a script [message #723794 is a reply to message #723636] Fri, 09 September 2011 13:59 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1687
Registered: July 2009
Senior Member

If I'm understanding what you're trying to do, you could just add a computed column in your dataSet or add a new binding to your table and do your scripting in the expression builder. If you're for sure wanting to access this from script, you'll need to use the onCreate script in the detail row. The onPrepare doesn't have access to the data. Hope this helps.

Regards,

Michael

Contributor on
http://www.birt-exchange.org


Michael

Add interactivity, scheduling, sharing, live Excel export, and JS integration to your BIRT app with the new, free BIRT server, BIRT iHub F-Type.
Re: Calculate a row value in a script [message #724018 is a reply to message #723794] Sat, 10 September 2011 11:06 Go to previous message
Richard  is currently offline Richard Friend
Messages: 7
Registered: September 2011
Junior Member
Does the onCreate in the detail row enable you to alter or set the value of the computed column?
Previous Topic:Help!!! Issue with flat data file
Next Topic:Dynamically change line chart or bar chart with on-screen slider
Goto Forum:
  


Current Time: Mon Dec 22 13:01:02 GMT 2014

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

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