Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Total Value on a 2-band report
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01178103
Message ID:
01178527
Views:
9
>>
>>If you only want to count the records in detail1 band, this is what you have to do. Mark the variable as COUNT, and change the RESET AT value to Detail1 Band. This tells VFP to ONLY process this variable for the records in Detail1 band. It won't process it for the parent or for the 2nd detail band.
>
>I actually did try that last night and it still didn't work. The problem with RESET AT to Detail1 band is that the total will hold the value of the very last row of the Detail1 band. So I had to use the method of creating a cursor of totals (outside of the report). Then I use this cursor to print totals.
>
>Thank you.

You must not have something right or I'm not understanding your problem. If you are trying to create a subtotal on a column in detail1 band .. define a report variable called rnTotal, set the expression to MyTable.AmountField, set the calculation option to SUM, set the Reset At value to Detail1Band. In the Detail1 Footer Band, print the rnTotal variable and it will contain the subtotal of the records that just printed in the last Detail1 band set. It should not contain just the amount of the last record in Detail1 band.
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform