Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SubTotals
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
00999357
Message ID:
00999423
Vues:
40
>I have a report in which I'm wanting to generate the totals for all matching account numbers. When account number "B" is next, need the subtotal for that number, etc.
>
>I figured out the total for the entire database, but looking for subtotals based on the account number.
>
>
>Thanks in advance.
>
>AlexFher

If you need the subtotals along the way, meaning you have your data sorted by account number, create a data group on account number. You can then print the amount in the data group footer, and select the SUM option under the calculate functions, and set the "Reset At" value to that data group. This will tell VFP to reset the total each time it starts a new account number.

If you need the subtotals at the end of the report, you'll have to do something different. If you know specifically which accounts you are dealing with, you can create report variables for each one, using the following expression: IIF(field=thisaccount, amount, 0). Then set the calculate option to SUM so it totals these for the entire report.
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform