• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 259
  • Last Modified:

summing up a calculated field

What's the simplest way to sum up the values of a calculated field into a Tlabel or Tedit control?
0
ziche
Asked:
ziche
1 Solution
 
mokuleCommented:
You can use TQuery and

Query1.Active := False;
Query1.SQL := 'Select SUM(Your Calculation Formula) as SumResult FROM TableName WHERE something'
Query1.Active := True;
Edit1.Text := Query1.FieldByName('SumResult').AsString;
0
 
gwalkeriqCommented:
If you are talking about a Delphi Calculated field, I know of no means (in general) other than iterating through the recordset.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now