Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Replace string with null
Replace string with null [message #656097] Thu, 24 February 2011 08:28 Go to next message
JP Redro is currently offline JP RedroFriend
Messages: 167
Registered: July 2009
Location: India
Senior Member

Experts,

we have built a report in 2.2.1, here i want to replace string with null value but i was fail.

ex: 12345.50
i want this as 1234550

when i use replace function i am not getting '0' at the end. i have used the replace like dataSetRow["NAMT"].replace('.',''); then i am getting 123455 only.

Please assist me in this.
Thanks,
JP


Thanks,
JP
Re: Replace string with null [message #656244 is a reply to message #656097] Thu, 24 February 2011 16:17 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

JP,

I assume the issue is because NAMT is a number not a string to begin with.
For example a data item with this expression:
var xy = "1234.50";
var str =xy + "";
str.replace('.','');

Returns the right string but this will not:

var xy = 1234.50;
var str =xy + "";
str.replace('.','');

Jason

On 2/24/2011 3:33 AM, JP wrote:
> Experts,
>
> we have built a report in 2.2.1, here i want to replace string with null
> value but i was fail.
>
> ex: 12345.50
> i want this as 1234550
>
> when i use replace function i am not getting '0' at the end. i have used
> the replace like dataSetRow["NAMT"].replace('.',''); then i am getting
> 123455 only.
>
> Please assist me in this.
> Thanks,
> JP
Previous Topic:Preview fails when parameters present
Next Topic:Bar Chart vertical axis scaling question
Goto Forum:
  


Current Time: Fri Dec 19 14:34:20 GMT 2014

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

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