Results 1 to 10 of 10
  1. #1
    brownk is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    May 2012
    Location
    Evansville, IN
    Posts
    56

    Post Sub report totals


    Hello, i'm having some problems displaying totals on my main report, from my sub report. I have a sub report named LnAmount, which has three fields. amount, SumOfFeeAmount, and newMoney. In the report footer i have a text box for each set to invisible. =Sum([amount]), named Amount1, =Sum([SumOfFeeAmount]), named fees, and =Sum([newMoney]), named New Money.
    On my main report i have in the footer =[LnAmount].[Report].[Amount1]. It seems to work, except it is only displaying the last entry on the main report instead of the totals. Any help would be appreciated!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,602
    Try referencing the subreport through the subreport container control.

    =Reports!mainreportname.subreportcontainername.Rep ort.Amount1
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    brownk is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    May 2012
    Location
    Evansville, IN
    Posts
    56
    Thanks, i tried that an i am getting the same results.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,602
    I will have to review the report. If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    brownk is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    May 2012
    Location
    Evansville, IN
    Posts
    56
    I would but 90% of the data on this report is confidential, this is coming from a financial institution. Would you like some screen shots?

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,602
    I doubt screen shots would help me analyze issue but post whatever you want. Structure is the issue, not data. You could copy db and delete data (some dummy records to test with would be nice).
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    brownk is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    May 2012
    Location
    Evansville, IN
    Posts
    56
    Okay so i sort of got it to work with DSum except its giving me the entire totals from all the entries on the sub report. I forgot to mention the subreport lists ALL amounts but my main report is only calling for amounts that meet a certain criteria. The main report is not displaying the totals from the amounts listed on the main report, its a grand total of every single dollar amount in our system.

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,602
    Yes, the DSum would need the same criteria as used by the report.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    brownk is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    May 2012
    Location
    Evansville, IN
    Posts
    56
    =DSum("[amount]","qry_LnAmount") - =DSum("[SumOffeeAmount]","qry_LnAmount") - =DSum("[newMoney]","qry_LnAmount") is what i have so far in the footer of my main report. qry_LnAmount being the subreport. Does something else need to go in each expression, or do i need to change something on my LnAmount sub report? Sorry I'm pretty confused

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,602
    There can be only one equal sign and that would be at the beginning of the expression.

    Every domain aggregate function has a WHERE CONDITION argument which is used to restrict the set of records used. If you are basing the DSum on the same query that the subreport is bound to, then the filter criteria might be the ID from the main report.

    The general syntax is:

    DSum("fieldname", "data source", "filter criteria")

    The filter criteria is like the WHERE clause of an SQL statement. Access Help has more guidelines on using domain aggregate functions.

    I just don't know your project well enough to be more specific.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Report totals don't match
    By RayMilhon in forum Reports
    Replies: 7
    Last Post: 11-30-2012, 10:44 AM
  2. Totals Query for Report
    By SpdRacerX in forum Queries
    Replies: 3
    Last Post: 05-01-2012, 02:25 PM
  3. Report with monthly totals?
    By KrisDdb in forum Access
    Replies: 7
    Last Post: 12-06-2011, 11:49 AM
  4. Replies: 5
    Last Post: 12-06-2011, 11:18 AM
  5. Summing Report Totals
    By bugme in forum Reports
    Replies: 3
    Last Post: 05-09-2011, 09:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums