>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.