Results 1 to 6 of 6
  1. #1
    shootermcgavin is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    3

    Need help creating a "summary" report


    I’m trying to build a report in Microsoft Access and I’m running into a little bit of a problem. I’m not extremely experienced in Access, but I need to do this for a class project.

    To put this in easier terms, I’ll relate it to a simpler idea than the actual project itself. Let’s say I’m trying to build a report that sums up everything I’ve spent at the grocery store in the past few years. Broken down first by grocery store. So, on one page of the report, I want the summed amount that I’ve spent at Stop and Shop. Under that will be different categories… milk, bread, water, etc. On the next page, I want the same information, just for Shop Rite. Etc, etc. I have tables and queries set up like this
    Click image for larger version. 

Name:	one.jpg 
Views:	6 
Size:	34.9 KB 
ID:	12796

    When I attempted to create the report, it puts a single record on per page. When in reality, I just want one “Grocery Store” per page and have everything summed up. Sort of looking like this:

    Click image for larger version. 

Name:	two.jpg 
Views:	6 
Size:	35.7 KB 
ID:	12797
    Sorry if this is a horrible example, it’s just easier than writing down all of the terminology that’s used in the project. I don’t know if this is too lengthy of a process and I simply need to learn more about Access or whether someone on here knows/can guide me in the right direction. I would really appreciate your help. Thanks.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    most of what you're asking for can be performed via formulas in a report based on your raw data. Typically people do not like commenting on 'class project' threads but there are a number of ways to get to what you want and I'll give you one example

    first create a report based on your dataset (Lets assume your first screenshot is your entire dataset and it's a query, or table, named TESTDATA)

    next, add a sorting/grouping of SHOP NAME, make sure the header and footer section are showing
    in the header section of the SHOP NAME put the shop name

    next, add a sorting/grouping of ITEM, make sure the header and footer section are showing
    in the header section of the ITEM put the item name
    in the footer section of each item you'd have a formula like =sum(iif(year = 2011, amount, 0))
    and do it for each year.

    There are more elegant ways to do this so that your report can be used for any year (let's say your database has 20 years of data and you want to be able to pick any 3 year period in there) but the same basic design holds you'd just have to modify your source so that it's only showing the data you want (through a query for example)

  3. #3
    shootermcgavin is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    3
    Sorry, I'm new here. Not sure what's accepted and what's not. But thank you for replying anyway. I'll give what you wrote a shot. Thanks a lot, I appreciate it.

  4. #4
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    There's no rule against asking for help on class projects, shooter. Your question was well presented and politely phrased, which goes a long way here, like most places in life. You even provided pictures!

    If you're getting a single record per page, then for some reason you are page-breaking for every record. Okay, that's circular, but it can be interpreted to mean something. This might be because your sort order is mismatched to your break logic, in other words because you told the report to break whenever A or B changed, but sorted on X and Y. I haven't seen this happen in Access, but I've seen it in every other report product I've ever worked with, so that's the first thing I'd look for.

    Once you've handled your immediate problem, you might want to look at Pivot Tables and Crosstabs, which can get you some really great reports very similar to what you're attempting here.

  5. #5
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    Shooter, You will find that on this forum and most like it that people are willing to help students readily.
    They will answer most questions.
    What they don't like is to do the work for the student.

    Please post your questions and most will qive you an answer to GUIDE you. I will if I can.

    Dale

  6. #6
    shootermcgavin is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    3
    rzw, I know, hence why I said "guide me in the right direction" in my original post. I wasn't asking anyone to do my work for me, I was just getting stuck with the records.

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

Similar Threads

  1. Replies: 8
    Last Post: 04-18-2013, 04:41 PM
  2. Export "Query or Report" to a "Delimited Text File"
    By hawzmolly in forum Import/Export Data
    Replies: 3
    Last Post: 08-31-2012, 08:00 AM
  3. Replies: 1
    Last Post: 08-23-2012, 08:32 AM
  4. Replies: 11
    Last Post: 03-29-2012, 02:32 PM
  5. Creating "Edit Record" link in table column
    By joshearl in forum Forms
    Replies: 1
    Last Post: 12-25-2009, 11:17 AM

Tags for this Thread

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