If you are passing a value with floating point , do not use the %d
format, it is used for < in> integer , use %m
for monetary values or %n
for floating-point values. Your code looks like this:
Format('%n', [Self.Owner.FieldByName('soma').AsFloat]);
Update
According to the Default LiveBindings Methods page function Format
is a bit different when using LiveBindings , instead of specifying an array of arguments [.., ...]
, is added as a parameter.
For example, the normal use of SysUtils.Format
usually looks like this:
/ p>
Format('%d %d', [1, 2])
At LiveBindings you should use:
Format('%d %d', 1, 2)
Following this reasoning you can use:
Format('%n', Self.Owner.FieldByName('soma').AsFloat);