Issues Calculating report footer

M

maupiedra

Your help with this will be greatly appreciated!!! This should be a pretty
simple issue to resolve but for some reason I'm having the hardest time
figuring out this simple footer.
The footer for 'Field A' below should be a total of footers Field B + Field C
+ Field D + Sum(Field E). Footer Field A is where I'm having issues. It
just doesnt add up the different footers... Any clue on what I'm doing wrong?
???

Thanks,
Mauricio.


Master Sub
Acct Acct Field A Field B Field C Field D Field E

12345 12345 100 10 10 80 20
12346 0 0 20 10 40
12347 0 0 -10 0 0

Footer for: 12345 =[Field B] Field B Field C Field D
=sum([Field E])
+ [Field C]
+ [Field D]
+ sum([Field E])

Following is what the footer output should look like:

Master Sub
Acct Acct Field A Field B Field C Field D Field E
Footer for: 12345 160 10 10 80
60
 
D

Duane Hookom

I am having trouble wrapping my head around why you would want to sum some of
the fields and take a single value from others. If you use [Field C] in the
group footer, it will be the last value from the group which is -10.
 
M

maupiedra

Duane,
Where the Master Account and Sub Account equal each other (MA=12345 &
SA=12345) Field A is a sum of Fields B, C and D but does not include Field E.
Also, where the Master Account and Sub Account equal each other... Fields B,
C, and D are a sum of the detail of all the other Sub Accounts (12346, 12347,
etc). This is why I don't want to sum them up in the footer otherwise if I
do so I will be double adding.
What I'm trying to do is sum up all the values of Field E in the footer (=sum
([Field E]) and then have Field A equal either:

1. [Field A]+[sum([Field E]) or
2. [Field B]+[Field C]+[Field D]+(sum([Field E])

Either one of these two formulas should yield the correct result but I cant
seem to get it to apply properly.

Mauricio.


Duane said:
I am having trouble wrapping my head around why you would want to sum some of
the fields and take a single value from others. If you use [Field C] in the
group footer, it will be the last value from the group which is -10.
Your help with this will be greatly appreciated!!! This should be a pretty
simple issue to resolve but for some reason I'm having the hardest time
[quoted text clipped - 26 lines]
Footer for: 12345 160 10 10 80
60
 
D

duanehookom

I'm not sure how you expected anyone to have know that from your first
post. Since Fields B C and D will have multiple values in the detail
section, I don't know which ones to include in the group footer
expression.

You can conditionally sum a column of numbers by using an expression
like:
=Sum( Abs( {expression} ) * [Field])
so manybe
=Sum( Abs( [MasterAcct]<>[SubAcct] ) * [Field B])

This should be enough to get you going.

Duane Hookom
MS Access MVP.


Duane,
Where the Master Account and Sub Account equal each other (MA=12345 &
SA=12345) Field A is a sum of Fields B, C and D but does not include Field E.
Also, where the Master Account and Sub Account equal each other... FieldsB,
C, and D are a sum of the detail of all the other Sub Accounts (12346, 12347,
etc).  This is why I don't want to sum them up in thefooterotherwise ifI
do so I will be double adding.
What I'm trying to do is sum up all the values of Field E in thefooter(=sum
([Field E]) and then have Field A equal either:

1.  [Field A]+[sum([Field E]) or
2.  [Field B]+[Field C]+[Field D]+(sum([Field E])

Either one of these two formulas should yield the correct result but I cant
seem to get it to apply properly.

Mauricio.



Duane said:
I am having trouble wrapping my head around why you would want to sum some of
the fields and take a single value from others. If you use [Field C] in the
groupfooter, it will be the last value from the group which is -10.
Your help with this will be greatly appreciated!!!  This should be apretty
simple issue to resolve but for some reason I'm having the hardest time
[quoted text clipped - 26 lines]
Footerfor: 12345        160             10             10             80
60- Hide quoted text -

- Show quoted text -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top