?
Solved

summing up a calculated field

Posted on 2004-03-26
2
Medium Priority
?
254 Views
Last Modified: 2010-04-05
What's the simplest way to sum up the values of a calculated field into a Tlabel or Tedit control?
0
Comment
Question by:ziche
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 17

Accepted Solution

by:
mokule earned 200 total points
ID: 10687930
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
 
LVL 6

Expert Comment

by:gwalkeriq
ID: 10691533
If you are talking about a Delphi Calculated field, I know of no means (in general) other than iterating through the recordset.
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question