[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 435
  • Last Modified:

Sum the total in a group to get grand total

I have a report that has a group for customer which have a unapplied amount which i show in the group footer. I need to sum the total for the unapplied amount in the report footer.

I cannot use the Sum(unapplied amount) because the unapplie amount is the same for each customer and every detail will have that the same amount

Can someone let me know how i can sum it?
0
tvae
Asked:
tvae
1 Solution
 
peter57rCommented:
I think you will have to create a separate query to get this total and then use a dsum to get the value.

You want a query that is something like...(amend for your own table & field names)

Select Customerid, max(unapplied) as maxunappliedamount
from table group by Customerid

If this is saved as qryUnapplied, then in your textbox for the grand total set the controlsource to..

=Dsum("maxunappliedamount", "qryUnapplied")
0
 
Jeffrey CoachmanCommented:
Yes, this confuses me also:
<I cannot use the Sum(unapplied amount) because the unapplie amount is the same for each customer and every detail will have that the same amount>
...then how are you getting the correct total in the group footer?

As with most Report issues, it is sometimes best if you posted a sample database:
Sample database notes:
1. Back up your database(s).
2. Combine the front and back ends into one database file.
3. Remove any startup options, unless they are relevant to the issue.
4. Remove any records unless they are relevant to the issue.
5. Delete any objects that do not relate directly to the issue.
6. Remove any references to any "linked" files (files outside of the database, Images, OLE Files, ...etc)
7. Remove any references to any third party Active-x Controls (unless they are relevant to the issue)
8. Remove, obfuscate, encrypt, or otherwise disguise, any sensitive data.
9. Unhide any hidden database objects
10. Compile the code. (From the VBA code window, click: Debug-->Compile)
11. Run the compact/Repair utility.
12. Remove any Passwords and/or security.
13. If a form is involved in the issue, set the Modal and Popup properties to: No
    (Again, unless these properties are associated with the issue)
14. Post the explicit steps to replicate the issue.
15. Test the database before posting.

In other words, ...post a database that we can easily open and immediately see and/or troubleshoot the issue.
And if applicable, also include a clear graphical representation of the *Exact* results you are expecting, based on the sample data.
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now