|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Adding data to table1 at specified column
Hi all,
I have got a data like that - Code:
Man Cash Credit Adidas 5000 1500 Samsung 3500 5000 Sony 6000 Company1 4500 Now I need to add the numbers in each field, and make a result, like this -> ------------------------------------------ Total: 24500 Cash: 14500 Credit: 10000 Any suggestions? Thanks. |
|
#2
|
||||
|
||||
|
Why do you need to add the data to the table. Don't you just want a summary line at the end? If so, all you need is something to execute this query:
SELECT sum(cash), sum(credit) from table1 and then get the two values and add them together to get the grand total. Then, in your report, make these separate labels (or computed fields) and set them accordingly.
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by Keath and KevinADC, superior perl programmers of the month |
|
#3
|
|||
|
|||
|
Thanks a lot for your reply.
But still got some difficulties. 1) I don't know where to put that Labels in Rave Report, because it should be at the end, but I dont know how many records I am going to print. How may I put that label - which shows result to the end of the page? One more question - how may I delete all empty fields in Table? Ex, Man Cash Credit Adidas 200 20 Samsung 15 Sony ------------------ It should look like this Adidas 200 20 Samsung 15 Sony -------- //editing.. How may I copy all contents of a table1 to the table2 if the field names are the same? Thanks again. Last edited by Ruh : January 26th, 2006 at 09:17 AM. Reason: 1+ quest. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Delphi Programming > Adding data to table1 at specified column |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|