16-06-2017, Saat: 21:51
selamın aleyküm hayırlı ramazanlar;
Listviewde 2 tane parasal 1 tanede adet alanım var, Yani ürün fiyatı * adet = toplam olacak.
Örnek:
125.000 * 5 = 625.000 TL
150 * 3 = 450 TL olacak, fakat bir türlü çarpma işlemini yaptıramadım sürekli hata alıyorum bu konuda yardımcı olur musunuz.
Hata kodu: First chance exception at $752E845D. Exception class EConvertError with message ''500.000' is not a valid floating point value'. Process Follow.exe (5424)
Listviewde 2 tane parasal 1 tanede adet alanım var, Yani ürün fiyatı * adet = toplam olacak.
Örnek:
125.000 * 5 = 625.000 TL
150 * 3 = 450 TL olacak, fakat bir türlü çarpma işlemini yaptıramadım sürekli hata alıyorum bu konuda yardımcı olur musunuz.
procedure TForm4.Hesap(Sender: TObject); // Hesaplama var Fiyat, Adet, Toplam: Real; //: Currency; begin if LV.Items.Count > 0 then begin With LV do begin Items.BeginUpdate; try for I := Items.Count - 1 downto 0 do begin Fiyat := strtofloat(Items[I].SubItems[2]); Adet := strtofloat(Items[I].SubItems[3]); Items[I].SubItems[4] := floattostr(Fiyat * Adet); // Toplam := Toplam + StrToInt(Items[I].SubItems[5]); // LabelToplam.Caption := 'Toplam: ' + Format(' %e', [Toplam]); end; finally Items.EndUpdate; end; end; end; end;
Hata kodu: First chance exception at $752E845D. Exception class EConvertError with message ''500.000' is not a valid floating point value'. Process Follow.exe (5424)