Board index » delphi » Summaries. Count, Average etc.

Summaries. Count, Average etc.

This is the second time of trying so I assume its a tough one.

Is there a quick and easy way to do a summary in Delphi 2.0 like you can in
Paradox. I can't find any info anywhere.

I could use a TQuery and set the SQL property accordingly but in this case
I want to sum a calculated field and Delphi doesn't seem to like this.

Any help would be very gratefully received. Thanks in advance.

Paul Brian

 

Re:Summaries. Count, Average etc.


This is a multi-part message in MIME format.
--------------95ECC2A266D8A94B9C4C2C80
Content-Type: text/plain; charset=iso-8859-1
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Content-Transfer-Encoding: 8bit

Its not very elegant, but you could build the table with the calculated
field (TTable or TQuery), then loop through and sum the calculated field
values.
If the tables arent too big, this is a quick-and-dirty workaround.

regards
Andr

Quote
Paul wrote:
> This is the second time of trying so I assume its a tough one.

> Is there a quick and easy way to do a summary in Delphi 2.0 like you
> can in
> Paradox. I can't find any info anywhere.

> I could use a TQuery and set the SQL property accordingly but in this
> case
> I want to sum a calculated field and Delphi doesn't seem to like this.

> Any help would be very gratefully received. Thanks in advance.

> Paul Brian

--------------95ECC2A266D8A94B9C4C2C80
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Andr  Lernhart
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Andr  Lernhart
n:              Lernhart;Andr
org:            chispas software Ltda.
adr:            Los Alpes, Tv. 72 #31B-35;;A.A. 10395 (P.O. Box);Cartagena de Indias;;;COLOMBIA (South America)
email;internet: chis...@ns.axisgate.com
tel;work:       ++ 57 5 663 10 72
tel;fax:        ++ 57 5 663 10 72
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
end:            vcard

--------------95ECC2A266D8A94B9C4C2C80--

Other Threads