procedure TForm1.Button1Click(Sender: TObject);var I:Integer;begin for I:=0 to Query1.FieldCount-1 do if Query1.Fields.DataType in [ftSmallint, ftInteger, ftWord, ftFloat, ftCurrency, ftBCD,ftAutoInc,ftLargeint] then Query1.Fields.OnGetText := Query1GetText;end;procedure TForm1.Query1GetText(Sender: TField; var Text: String; DisplayText: Boolean);begin if Sender.AsFloat=0 then Text:='' else if Sender.DataType in [ftSmallint, ftInteger, ftWord,ftAutoInc,ftLargeint] then Text:=IntToStr(Sender.AsInteger) else Text:=FloatToStr(Sender.AsFloat)end;