Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subtotal without grouping 2

Status
Not open for further replies.

deduct

Programmer
Jul 5, 2002
78
0
0
US
Code:
Case Corp_Cd  Account  Acct_Name            Amount
2    260      10060    PETTY CASH            1,085
2    260      10475    BANK - OPERATING     11,166
1    MLS260   1000090  CASH ACCOUNTS            -4
1    MLS260   1000090  CASH ACCOUNTS        12,251
2    260      10700    CASH-B TO B       1,080,931
2    260      10720    CASH-PARENT       1,760,802
1    MLS260   1000091  CASH ACCOUNTS     2,841,733

Perhaps a simple question, but how can I create a report that subtotals on case without rearranging my data (without grouping)? In the sample above I would want four subtotals (one for the first two records, then the next two, then the next two, then the last one.

When grouping, I get just two totals, the 1s and the 2s, and I don't want that.

Karl
 
Use expressions like this
=Sum(IIf(Case = 2,Amount,0))


that should do it.

Paul
 
Thanks Paul.

Where in my report do I put that expression?

I'd like my report to look something like this"
Code:
Case Corp_Cd  Account  Acct_Name            Amount
2    260      10060    PETTY CASH            1,085
2    260      10475    BANK - OPERATING     11,166
                                                      12,251
1    MLS260   1000090  CASH ACCOUNTS            -4
1    MLS260   1000090  CASH ACCOUNTS        12,251
                                                      12,147
2    260      10700    CASH-B TO B       1,080,931
2    260      10720    CASH-PARENT       1,760,802
                                                   2,841,733
1    MLS260   1000091  CASH ACCOUNTS     2,841,733
                                                   2,841,733

From there, just FYI, I am going to identify instances when the subtotals don't agree.

Karl
 
Well, that's a nice layout but not practical for an Access Report. That really is a spreadsheet appearance. First, you can't get your subtotals on a separate line without using some type of footer, or possibly a subreport. Second, there doesn't seem to be anything that differentiates the similar Case values that would allow you to total the first first two Case 2's together and the last two totaled together. There would have to be some other criteria that tells access that the first two belong together and the last two belong together.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top