Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sum amounts in previous footer, not detail
Message
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00564517
Message ID:
00564545
Views:
27
This message has been marked as a message which has helped to the initial question of the thread.
>>>I have a result set that was created from joining two tables. The result set was created in some third party software so I can not change the Query.
>>>
>>>I am using the first footer band as the detail band (cust#+order# below). Now i want my second footer to sum the amounts that are in the first foot, not to sum the detail record amounts.
>>>
>>>
>>>cust# order# order_tot item#
>>>12345 4444 100.00 331
>>>12345 4444 100.00 332
>>>12345 4455 40.00 787
>>>12345 4455 40.00 787
>>>32434 4322 20.00 656
>>>
>>>I want the report to be
>>>
>>>12345 4444 100.00 2
>>>12345 4455 40.00 2
>>> ------- ----
>>> 140.00
>
>>Can you run one more SELECT and use it's result in a report?
>SELECT * from resultset ;
> GROUP BY 1,2 ;
> INTO CURSOR myReport
>>-- sb --
>>
>
>A subroutine, that I can not easily change, creates the cursor and then throws me into report designer.
>
>Brenda

Ok. Create two report variables:
Name      Value To Store  Initial Value Reset        Calculation
co_seq    0               0             cust#+order# Count
co_amount IIF(co_seq=1, amount, 0)
                          0             cust#+order#  -
Add to your second footer field with co_amount, Calculation=Sum amd reset on cust#. That should do it.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform