Skip to main content



      Home
Home » Archived » BIRT » Replace string with null
Replace string with null [message #656097] Thu, 24 February 2011 03:28 Go to next message
Eclipse UserFriend
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
Re: Replace string with null [message #656244 is a reply to message #656097] Thu, 24 February 2011 11:17 Go to previous message
Eclipse UserFriend
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: Tue Jul 22 12:47:06 EDT 2025

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

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

Back to the top