Solved

Grand Total based on calculated sub-group field

Posted on 2013-01-08
10
1,029 Views
Last Modified: 2013-01-08
I have a MS Access Database that track products through 3 different departments.  The report that I have groups items by Item, then by Department then by Operator. I have a calculated subgroup fields (in the department footer) that takes the 1. [SumOfQty] / [SumOfTime] and 2.  [SumOfLaborCost] / [SumOfQty]

Now I want to get a grand total of these calculated fields in the Item Footer. But everytime that I try and reference the calculated field and run the report, it pops up asking for the parameter to be entered.

I have added two files to help explain.

How can I add the sub-groups total lines to a Grand total when they are a calculated field?
Rpt-Problem---Print-Preview.jpg
Rpt-Problem---Report-Design.jpg
0
Comment
Question by:dsheridan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
10 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38755786
If I am understanding correctly, ...If it were me, I would do your two calculations in the Reports recordsource, then you could just bring these in as fields( ex: SumOfQtySumOfTime), then you get any summary you wanted  with something like this as a textbox control source:
=Sum([SumOfQtySumOfTime])

JeffCoachman
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38755815
something like this:
Database171.mdb
0
 

Author Comment

by:dsheridan
ID: 38755879
Let me see if I can clairify so more. I'm getting all the calculations except when I try and add the calculated field into the item footer for CostPerPeice.  I cannot just do a total sum because it would count all depts several times

Looking at your example I have made some modifications so you can see.  
In the new example, let say you cannot simple add all depts as a total so you calculate the subgroup then sum that calculated field. Open the report in design and /or try and run the report.
Database171.mdb
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38755986
< I cannot just do a total sum because it would count all depts several times>
Not sure I follow...
In my sample, it counts and sums each group only once...

Based on my sample post a clear graphical representation of the *exact* output you are looking for here (based on the exact numbers in my sample)
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
ID: 38756050
Something like this perhaps:
Database171-1-.mdb
0
 

Author Comment

by:dsheridan
ID: 38756254
Great (screen shot to show how it works.
0
 

Author Closing Comment

by:dsheridan
ID: 38756256
Excellent. Problem solved.  I didn’t even think (or know) about the “running sum” function under the properties data tab.

Here’s what I did to fix problem with the help from “boag2000”.

Copied the calculated field into the same group footer and then made the Visible = “No” with a name of the field called “txtSumCPP”.  Then in the Item footer group I made the control source of the total field equal to “=[txtSumCPP]”.  The reason that you need to make a second item is it will keep the running sum in each group footer and would not know what the total for that group was.  I have a screen shot attached to show that it works correctly.

Thank you so much for your help.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38756428
No problem
;-)

Sorry I misinterpreted your original request
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38756761
dsheridan,

And congratulation on investigating the sample extensively on your own to find the "Running Sum" property...
Typically most people will just say "How'd you do that?"

...and you repaired your own report without any direct help form me.

Congratulations, Great work!
;-)

JeffCoachman
0
 

Author Comment

by:dsheridan
ID: 38757393
just neede a nudge in the right direction. Thanks again..;-)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question