How to Display Real Value Without Decimals

Hi All,

I want to display real value in form without decimals(.00)…I have one table with Real Field.

In Form I want to display Like

Value =1.5 in table->1.5 in form

Value=1.00 in table ->1 in form

Thanks in Advance…

in the form control there will be property. show zero - No (make it no)

I have tried… but not working…

Try by setting MinNoOfDecimals to zero on the form control.

Have you tried it?


you can create display method with string EDT in that table. And write condition in that display method based on the decimal value like this.

real amt ;
//amt = frac(12.345);
amt = frac(this.field);
if(amt > 0)
return strfmt("%1",this.field);
return strfmt("%1",real2int(this.field));

Hi ,
Tried …Still not working…

It is working for me, not sure if you have made the change correctly?

After restaring Ax Its working perfectly…

Hi Kranthi,
Can you tell me how to convert all integer field’s value to real…
Table -A
Field1-Integer-10 records
Field2-Real-10 record(Copy of Field 1 But in Real)…

So do you want to copy the integer field value to Real field? If so just copy it.

update_recordSet A
setting Field2 = (A.Field1);