PC Review


Reply
Thread Tools Rate Thread

Access Report Incorrectly Summing Grouped Data

 
 
Chris Moore
Guest
Posts: n/a
 
      5th Nov 2010
I have data structured as follows:

AppleTable:

Field1: Apple Categories:
A
B
C

Field2: Apple Category Amounts:
$100
$150
$200

Thus the amount for Apple Category B is $150, etc...


OrangeTable:
Field1: OrangeCategories:
aa
bb
cc
Field2: OrangeCategoryAmounts:
$75
$125
$175
Field3: Apple Category:
A
A
C

Thus one type of Apples can equal multiple types of oranges. In the
above example the total for Apple Category A = $100 but the total for
all the Orange Categories associated with Apple Category A is $200.

I have a report that represents this data. It is grouped by Apple
Category. In each Apple Category the Orange Categories are listed as
details. The Apple Category Footer contains a text box summing the
total amount for all the Orange Categories in that Apple Category as
well as a text box containing the amount for that Apple Category (no
summing needed for that).

The underlying query has Orange Category, Orange Category Amount,
Apple Category and Apple Category Amount. The the amounts in the Apple
Category Amount field are repeated given there are multiple Orange
Categories per Apple Category.

The problem is that when I try to sum the Apple Category Amount in the
report footer I get an amount equal to sum of all the repeated values
in the Apple Category Amount in the query. How can I get just the sum
of the Apple Category Amounts?

Thanks!


 
Reply With Quote
 
 
 
 
a a r o n . k e m p f @ g m a i l . c o m
Guest
Posts: n/a
 
      14th Nov 2010
wow, if you were using SQL Server Reporting Services, then you would
have a lot more control over stuff like this





On Nov 5, 7:40*pm, "Allen Browne" <AllenBro...@SeeSig.invalid> wrote:
> Access does indeed sum every record in the report to get the total. That may
> not be what you expect, though it does make sense.
>
> Can you group the report by FruitType? If so, you can create a group header
> (or footer.) In this section, add a text box bound to the Amount field. Set
> its Running Sum property to Over All. Set its Name to something like
> txtAmountRS. This text box will accumulate the amount. Since it does not
> repeat for every detail record, you don't get the duplications.
>
> Allen Browne - Microsoft MVP. Perth, Western Australia
> Tips for Access users -http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Chris Moore" *wrote in message
>
> news:7dc7c89e-b943-4bea-8c24-(E-Mail Removed)...
>
> I have data structured as follows:
>
> AppleTable:
>
> Field1: Apple Categories:
> A
> B
> C
>
> Field2: Apple Category Amounts:
> $100
> $150
> $200
>
> Thus the amount for Apple Category B is $150, etc...
>
> OrangeTable:
> Field1: OrangeCategories:
> aa
> bb
> cc
> Field2: OrangeCategoryAmounts:
> $75
> $125
> $175
> Field3: Apple Category:
> A
> A
> C
>
> Thus one type of Apples can equal multiple types of oranges. In the
> above example the total for Apple Category A = $100 but the total for
> all the Orange Categories associated with Apple Category A is $200.
>
> I have a report that represents this data. It is grouped by Apple
> Category. In each Apple Category the Orange Categories are listed as
> details. The Apple Category Footer contains a text box summing the
> total amount for all the Orange Categories in that Apple Category as
> well as a text box containing the amount for that Apple Category (no
> summing needed for that).
>
> The underlying query has Orange Category, Orange Category Amount,
> Apple Category and Apple Category Amount. The the amounts in the Apple
> Category Amount field are repeated given there are multiple Orange
> Categories per Apple Category.
>
> The problem is that when I try to sum the Apple Category Amount in the
> report footer I get an amount equal to sum of all the repeated values
> in the Apple Category Amount in the query. How can I get just the sum
> of the Apple Category Amounts?
>
> Thanks!


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data showing incorrectly in report Tim Microsoft Access Reports 9 20th Aug 2009 07:15 PM
Year([due data]) causing problems in grouped report Michelle K. Microsoft Access Reports 6 28th May 2009 07:16 PM
RE: Grouped data not shown in report using subquery Duane Hookom Microsoft Access Reports 1 14th Jul 2008 07:59 AM
Grouped report without data regrat Microsoft Access Form Coding 0 28th May 2008 05:55 AM
Microsoft Access Report - summing only grouped values ej_user Microsoft Access Reports 2 1st Mar 2004 07:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:27 PM.