Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to sum/count a child grid column values

Status
Not open for further replies.

vitorsa

Programmer
Apr 28, 2000
13
PT
Hi, i've received some answers to a similar question but i've formulated a bad question.
I know that SUM can summarize a column values by a certain condition but is to slow to when you do a refresh.
I need to sum a column of a child table or count a column for different values based in values that a grid contain.
I've tried to write a function that runs in dynamicbackcolor but i can't control the times it runs.

best regards
 
I don't think you'll be able to improve performance by attempting to operate on the values displayed in the grid rather than the underlying tables.

If SUM is slow, you can probably get a major increase in speed by making sure you've got the proper indexes built.

Jim
 
Hi Vitorsa,
Build a VIEW for the child table and requery.
When you do the SUM on this query, the application will work much faster, rather than doing th sum on the table dirctly.

You can also use an SQL CURSOR built for the child Grid instead of the view. Choice is yours.

You are sure to see the performance variation to the better in this way.

ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
I use seek and scan whil which has proved to be the fastest to me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top