Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Addition of two number fields Example(Java script through expression builder)(I need one complete script for adding two fields Under Expression Builder)
Addition of two number fields Example(Java script through expression builder) [message #892811] Fri, 29 June 2012 19:50 Go to next message
avinash Kumar is currently offline avinash Kumar
Messages: 2
Registered: June 2012
Junior Member
I am new to BIRT. I have XML Data Set. All fields which is defined in this XML is bydefault of Object type. Whenever i am performing simple addition of two fields for example row["a"]+row["b"], its giving some error like Nan.
I just need a simple example where I can add two fields with complete Javascript code so that same concept i can use henceforth.
Your help will be greatly appreciated. I am in urgent need as we have just started similar project.

Thanks!!!

[Updated on: Sun, 01 July 2012 09:37]

Report message to a moderator

Re: Addition of two fields Example(Java script through expression builder) [message #893147 is a reply to message #892811] Mon, 02 July 2012 21:52 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Are you wanting to add to objects? Can you post a snippet of the xml?

Jason

On 6/29/2012 3:50 PM, avinash Kumar wrote:
> I am new to BIRT. I have XML Data Set. All fields which is defined in
> this XML is bydefault of Object type. Whenever i am performing simple
> addition of two fields for example row["a"]+row["b"], its giving some
> error like Nan. I just need a simple example where I can add two fields
> with complete Javascript code so that same concept i can use henceforth.
> Your help will be greatly appreciated. I am in urgent need as we have
> just started similar project.
>
> Thanks!!!
Re: Addition of two fields Example(Java script through expression builder) [message #894179 is a reply to message #893147] Sat, 07 July 2012 12:08 Go to previous messageGo to next message
avinash Kumar is currently offline avinash Kumar
Messages: 2
Registered: June 2012
Junior Member
Hi Jason,
Thanks for your reply!
Actually, I need to add two fields (object type)
currency 1=euro 75
crrency 2= euro 60
when i am adding these, it saying Nan because both object has text character as some part of it(euro).
could you give me code (java script) as how i can handle this situation?
Thanks once again in advance!!
Re: Addition of two fields Example(Java script through expression builder) [message #895104 is a reply to message #894179] Wed, 11 July 2012 17:04 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

What is the real Java data type for the object? Is it just a string?

Jason


On 7/7/12 8:08 AM, avinash Kumar wrote:
> Hi Jason,
> Thanks for your reply!
> Actually, I need to add two fields (object type)
> currency 1=euro 75
> crrency 2= euro 60
> when i am adding these, it saying Nan because both object has text
> character as some part of it(euro).
> could you give me code (java script) as how i can handle this situation?
> Thanks once again in advance!!
Previous Topic:Generate excel reports
Next Topic:Duplicate call to Store Procedure
Goto Forum:
  


Current Time: Thu Sep 18 03:41:14 GMT 2014

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

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