0

I'm having a weird problem with an old project that's still being maintained with Delphi 7.

I have a TFMTBCDField component, representing Firebird Numeric Field (called GROSSPRICE). It's value gets calculated on the server side (by the Firebird SQL server). Due to a 27% tax rate the values are often like 4999.9999 that I'd like to display values rounded.

The strange thing is that if I set the DisplayFormat on that field to a value that has the dot inside (eg: '0.##') then 4999.9999 gets displayed as "5" (Should be either "5000" or "4999.99"). The same thing works with Currency fields as expected.

I have attached some images with examples as well. Do you know why is that happening, and (if possible) how to resolve it?

enter image description here

LU RD
  • 34,438
  • 5
  • 88
  • 296
Attila Fulop
  • 6,861
  • 2
  • 44
  • 50

0 Answers0