Solved

summing up a calculated field

Posted on 2004-03-26
2
246 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
2 Comments
 
LVL 17

Accepted Solution

by:
mokule earned 50 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now