Suppress the decimal point, keep the decimal numbers

 5 Replies
 0 Subscribed to this topic
 22 Subscribed to this forum
Sort:
Author
Messages
Mary Porter
Veteran Member
Posts: 337
Veteran Member
The record layout for one of our benefit carriers wants the contribution amount to have an implied decimal. I tried toText((ER_Match),2) but that still leaves the actual decimal place.
Has anyone ever had to do this?
Greg Dey
Advanced Member
Posts: 23
Advanced Member
I've used the "replace". This gets rid of the period and the comma.
replace(replace(totext({PAYMASTR.NET_PAY_AMT}),".",""),",","")
John Henley
Posts: 3355
Try something like this toText((ER_Match)*100,"0")
Thanks for using the LawsonGuru.com forums!
John
Matthew Nye
Veteran Member
Posts: 514
Veteran Member
Excuse me if I misinterpreted but I think what youre asking is you dont want to show the decimal place (precision of 0) but you dont want it round? If so:

In Crystal right click the field
Select Formatt Field
Go to the Numbers Tab
Click Customize
Set the Decimals Drop Down to 1
Set the Rounding Drop Down to 0.01
If any of my answers were helpful an endorsement on LinkedIn would be much appriciated! www.linkedin.com/pub/matthew-nye/1a/886/760/
Dave Curtis
Veteran Member
Posts: 136
Veteran Member
I usually do these types of things in the SQL statement command.
For example - one of the files I had to create needed the rate of pay to be formated with no decimal point and it needed to be a number not text.
The way I accomplished this was with the following;

TO_NUMBER(REGEXP_REPLACE(TO_CHAR(e.pay_rate,'999.9999'),'\D',''),9999999)

This removes the decimal and ensures the format is numeric and the full length required.

However if you want to do it within Crystal then the suggenstion John gave would work also and if you want to take his and have it create a numeric field you could do

ToNumber(ToText({PAY_RATE}*10000,"0"))
Mary Porter
Veteran Member
Posts: 337
Veteran Member
Both toText({ER_Match)*100,"0")
and toNumber(toText({ER_Match)*100,"0"))
worked - thank you Gentlemen!