Hi there,

Someone replied to my question but I didn't see who it was
Anyway I you mentioned using money as integers.
I set the money field to integer however there is no currency in the object inspector (boolean)
so I used currency type instead.


So far so good with using currency type.
You still didn't mention how to add up each row of money.
Anyone know how?

Ben Iti


From: "Ben none" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Subject: [DUG]:  Another question
Date: Thu, 17 Jul 2003 21:45:24 +0000

Hi there

I want to add up the money field in each record in the clientdataset.
How do I go about doing that?

I thought it might be like this.

procedure TForm1.Calculate;
var
 i : integer;
 money, blank : float;
begin
blank := 0;
for i := 0 to ClientDataSet5.RecordCount do
  money := Floattostr(ClientDataSet5.Field.Fieldname('Money).AsString);
  blank := money + blank;
end;

Gotta go to work.

Ben Iti

_________________________________________________________________
Check out the Xtra gaming servers at  http://xtramsn.co.nz/gaming !

---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

_________________________________________________________________ Check out the Xtra gaming servers at http://xtramsn.co.nz/gaming !

---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to