what kind of subject is that ???? just don't know how to write the subject. Hope that u can understand !!
I have an Unit Price field in a report, where I want it to display 2 places of decimal point by default, but if user enter with 3 places decimal point value, then the field will show it in 3 places decimal point value and so on. This field will only allow user to enter up to 4 decimal point.
eg:
Unit Price Unit Price
(I want) (I get)
---------- ----------
123.00 123
52.50 52.5
52.638 52.638
9.4253 9.4253
I use the following formula I get from this forum, but it truncate the 2 trailing zeroes after the decimal point. This field should show the 2 trailing zeroes if there is no figure after the decimal point.
local numbervar p1;
local numbervar p2;
local stringvar s1;
s1 := totext({PODetails.Rate},"0.000000000000000"
p1 := instr(s1,"."
p2 := instr(s1+"000000000000000","000000000000000"
if (p2 = p1+1) then s1 := left(s1,p1-1)
else s1 := left(s1,p2-1);
s1;
thank u..
best regards,
ngcn
I have an Unit Price field in a report, where I want it to display 2 places of decimal point by default, but if user enter with 3 places decimal point value, then the field will show it in 3 places decimal point value and so on. This field will only allow user to enter up to 4 decimal point.
eg:
Unit Price Unit Price
(I want) (I get)
---------- ----------
123.00 123
52.50 52.5
52.638 52.638
9.4253 9.4253
I use the following formula I get from this forum, but it truncate the 2 trailing zeroes after the decimal point. This field should show the 2 trailing zeroes if there is no figure after the decimal point.
local numbervar p1;
local numbervar p2;
local stringvar s1;
s1 := totext({PODetails.Rate},"0.000000000000000"
p1 := instr(s1,"."
p2 := instr(s1+"000000000000000","000000000000000"
if (p2 = p1+1) then s1 := left(s1,p1-1)
else s1 := left(s1,p2-1);
s1;
thank u..
best regards,
ngcn