Replace string with null [message #656097] |
Thu, 24 February 2011 08:28 |
|
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 |
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02947 seconds