Subject How to Format a FLOAT field?
Author marcoandrecarvalho
Hi All!

I want to format a float field with 2 decimals, ex.: 12.2156523123,
converted = 12.21. I tried to use
IB_Connection.FieldsDisplayFormat := 'TEST=0.00' and
IB_Connection.FieldEntryTypes = fetDomainName, but it gives me this
error: "EConvertError with message "xxxx" is not a valid integer

I also tried to use CalculateFields, but without success either:

IB_Query1.CalculatedFields := 'TEST FLOAT NOT NULL' with the
following event:

procedure TDataModule1.taTestCalculateField(Sender: TIB_Statement;
ARow: TIB_Row; AField: TIB_Column);
if AField.FieldName = 'GANHO' then
AField.AsString := FormatFloat('##0.00',ARow.ByName

Can anyone give me a tip? What i´m doing wrong?

[]s, Marco André