epmedia
Posts: 4
|
Posted: 12/10/2005, 5:56 PM |
|
Using CC, ASP, MS Access, No Tempates, Microsoft.Jet.OLEDB.4.0.
This works for my grid form:
sSQL = "SELECT order_id, code_tr, code_pk, code_pk as description, quantity, customer, float_bc, daily_late_rate, return_schedule, days_renting, rental_price, date() - return_schedule as late_days, late_days*daily_late_rate as late_fees, late_fees*quantity as extended FROM orders WHERE code_tr=1 and status=1"
However, I would like to get a sum(extended) as GRANDTOTAL.
*********************
Example Grid Form (just to get the idea):
ID: 1, Qty: 2 Days Late: 3 Daily Late fee: $1.00 Extended: $6.00
ID: 2, Qty: 3 Days Late: 3 Daily Late fee: $2.00 Extended: $18.00
GRAND TOTAL: $24.00 (the sum from "extended")
*********************
I have read about "group by", however it does not work, I am assuming because it is fairly complex sql statement (to me anyways!).
Thanks in Advance!
Robert
|
|
|
peterr
Posts: 5971
|
Posted: 12/10/2005, 6:01 PM |
|
I think that the easiest way would be to create a query in MS Access that returns all these values. Then you can use the MS Access query in your grid.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
epmedia
Posts: 4
|
Posted: 12/10/2005, 8:54 PM |
|
You just turned me on to something I was not even aware of in MS Access. I created a query in sql view (same as grid form) and Wala! CC see's the query table I created and I just did the sum(extended) as grandtotal on a new grid page. It works! (still have to do more testing though :)) You put me on the right track! Thanks a bunch.
|
|
|
|