Paul,
I would doubt that you could actually calculate the totals IN the sql itself since you most likely have detail lines being generated (Actually you could write a single complex sql to do this but its not for beginners, if you pass the data structure and sql statement to this forum there are several SQL experts here who could write it). I would just issue two more sql's, one to calculate the totals and another to combine the data of the detail and the totals together.
Mike
I apologize if this is a stupid question. I am new to SQL. I am using a select SQL statement to fill a cursor with the records. Can this totals field be calculated from within the select statement? Or do I fill the cursor with the select statement and then go back through the cursor to calculate the totals?
>Or maybe there is some other solution?
>
>Thanks in advance,
>
>Paul
>>>I am trying to create an "A/R Statement" Report. In the group header I have the customers name etc and the detail band has the individual invoices and in the group footer I have a field with a variable to sume the invoice amounts. This all works fine. I was wondering if there is any way to get this total of invoices on the group header. I want the portion that the customer sends in with the payment to have the total on it as well.
>>>
>>>Thanks,
>>>
>>>Paul
>>
>>You can add a totals field to your table and pre-calculate the invoice sums prior to calling the report.
>>
>>Mike
Michael McLain