Chester Friesen wrote:
> I have an app in VFP7 that I need to sort on group totals. Is that a job 
> for VFP9? Forget it for VFP7?
> Now, the report looks nice, but needs the totals sorted on each group. I 
> have tried a 2 pass routine, but it's not really working right. I don't 
> know if this is enough info to give me some ideas or not.
> 
> Regards,
> Chester Friesen
> 
>

Hi, don't know if this is what you need :

create cursor MyCursor (TotFld N(2), Num N(12,2))

Insert some random values here

select TotFld, sum(Num) as MyTotal ;
        into cursor MyResult ;
        from Mycursor ;
        group by TotFld ;
        order by 1

and voilá, MyResult is ordered by TotFld and you have totals.
Hope it helps.




_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to