Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems in Group Total
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00133812
Message ID:
00133842
Views:
10
And Vinod,

Do not do like me, add the Cursor clase into the Into statement or it won't work. :).

Marc



>Hi Vinod,
>
>I think what you should do is to make the computations _before_ you start the report, save the computation on each delivery line in a cursor and submit that cursor:
>
>first sql to total your orders:
>
>select order, sum(qty) as tQty, sum(amount) as tAmount ;
>from order ;
>order by order ;
>group by order ;
>into crsTotal
>
>Join this to you Order table into the cursor that will be submitted to the report:
>
>select order.order,tqty,tamount,deliverydate ;
>from order where order.order=crsTotal.order ;
>order by order.order,deliverydate ;
>into crsReport
>
>Now this cursor you can submit to the same report as the one you are using now, grouping them by order and per buyer.
>
>HTH,
>
>Marc
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>>I'm making a report where 2 tables are being used, one is order file having all the orders(Parent) and other is delivery (child), my report is in this format :-
>>
>>Buyer x
>>=========
>>
>>order no1, total order qty,total amount, delivery date
>>blank, blank, blank, second delivery date
>>
>>order no2, total order qty,total amount, delivery date
>>----------------------------------
>>Total of order qty & amount (for buyer x)
>>-----------------------------------
>>Buyer Y
>>========
>>etc etc
>>
>>This report is coming buyer wise where I've made 2 groups, 1 is buyer group and second is Order no.
>>
>>I want the total of Order qty & amount, (fields of parent) but the problem in getting group totals in this report is, due to multiple delivery dates the total is coming wrong.
>>
>>Any suggestions/ideas to do this ??

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Previous
Reply
Map
View

Click here to load this message in the networking platform