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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculations in a TDBgrid

Status
Not open for further replies.

Jalr2003

Technical User
May 15, 2003
26
0
0
US
Hi,

I am new to C++ Builder, and I do not know all the jargon just yet, so please bear with me.

I am using a TDBgrid to display the results from a SQL statement. The values I get look like this,

NAME ITEM QTY
-------- -------- ---------
John Screw A 25
Beckie Screw B 12
Joe Washer A 13

The TDBgrid is linked to a TQuery object that uses Oracle ODBC driver.

I want to be able to add an extra row at the end in which I can put comments and/or the sum of the quantities displayed.

The desired results would look like this:

NAME ITEM QTY
-------- -------- ---------
John Screw A 25
Beckie Screw B 12
Joe Washer A 13
TOTAL 50

If I were to use Oracle SQL Plus, I would just set some breaks and computes. However, I cannot incorporate those lines into my sql statement, because I get a syntax error.

How can I accomplish this?

Thanks for your help,

JALR2003
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top