f4ichick02
asked on
How to remove an actual period from a number
I cannot figure out how to remove the period from a number formatted field in Crystal Reports. So basically here is the situation:
For the amounts.....
I need them to output like this:
50120
2100193
79200
Does anyone have any suggestions on things I can try? I already tried Replace and ToText and a couple others with nosuccess. Thank you in advance.
For the amounts.....
- 501.20
- 21001.93
- 792.00
I need them to output like this:
50120
2100193
79200
Does anyone have any suggestions on things I can try? I already tried Replace and ToText and a couple others with nosuccess. Thank you in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I do NOT want to lose the decimal places so the very first one will not work. mlmcc: I am going to try your solution shortly here and I will let you know if it works the way I need it to. Thank you so far for everything both of you
ASKER
mlmcc: I just tried using what you suggested which worked perfect(See below for the one I used). Thank you so much for your help!
Replace(CStr({YourField},2 ,''),'.',' ')
Replace(CStr({YourField},2
It´s possible to convert Numbers, Currency, Date, Time and DateTime.
//Code
NumberVar totalPay := 110.55;
cstr(totalPay, 0);
//End
or
//Code
NumberVar totalPay := 110.55;
ToText(totalPay, 0);
//End
The above functions will return the string “110” – In words, the NumberVar but with zero decimals.