Results 1 to 10 of 10
  1. #1
    Zimmerray is offline Novice
    Windows 10 Office 365
    Join Date
    Apr 2021
    Posts
    10

    Help with formatting a report.

    I have a report that is sent to Outlook in the following format:


    Click image for larger version. 

Name:	Report 1.jpg 
Views:	33 
Size:	70.9 KB 
ID:	45048

    I would prefer the report to be created in the following format:
    Click image for larger version. 

Name:	Report 2.jpg 
Views:	28 
Size:	87.4 KB 
ID:	45049

    The groups grow and shrink in number. For example, Group 1 could have 6 entries, Group 2 could have 3 entries, Group 3 could have 7 entries. (Or any other number between 0 and 30)
    I would appreciate assistance on how to accomplish this.

  2. #2
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,288
    That looks like Excel, but if you have an Access report, use the "Group and Sort" command in the report to set Group headers on the field "Group", sorted on Group ASCENDING.


    BTW, in Access, you should NOT use spaces in field names.
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

  3. #3
    Zimmerray is offline Novice
    Windows 10 Office 365
    Join Date
    Apr 2021
    Posts
    10
    The Excel file is a report sent to Outlook via "Send Report to Email" button:
    Click image for larger version. 

Name:	Image 6a.jpg 
Views:	21 
Size:	44.4 KB 
ID:	45060

    I used "the "Group and Sort" command in the report to set Group headers on the field "Group", sorted on Group ASCENDING". Got unexpected results.

    Click image for larger version. 

Name:	Image 19.jpg 
Views:	20 
Size:	76.2 KB 
ID:	45061

    All "Groups" are named Group 1. When the report gets to Outlook it appears like this:

    Click image for larger version. 

Name:	Image 27.jpg 
Views:	20 
Size:	70.7 KB 
ID:	45062

    This may be acceptable, but I prefer the original format I was asking to create.

    Last edited by Zimmerray; 04-22-2021 at 02:46 PM. Reason: Spelin and gamur

  4. #4
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,288
    I'm not sure how you got "Group 1" for the 3 group headers. I created a table, query and a report since you didn't provide a dB.
    Note that "GROUP" is a reserved word in Access and shouldn't be used for object names. Also, spaces in object names should be avoided.

    This is the results I get.
    Click image for larger version. 

Name:	Results1.png 
Views:	17 
Size:	20.6 KB 
ID:	45067

    Here is the design view
    Click image for larger version. 

Name:	Design1.png 
Views:	17 
Size:	29.4 KB 
ID:	45066
    The "Group" number is a calculation...
    Note that the labels for the name have spaces, but the field names do not.
    I renamed "GROUP" to "Grouping" for the field name and left the label as "Group"...
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

  5. #5
    Zimmerray is offline Novice
    Windows 10 Office 365
    Join Date
    Apr 2021
    Posts
    10
    Thanks for posting your design. How did you get your report to say Group A, Group B, and Group C? Mine displays Group 129, Group 130 and Group 131. Then when the report is Emailed and opened in Excel it appears like this:

    Click image for larger version. 

Name:	Image 31.jpg 
Views:	16 
Size:	70.1 KB 
ID:	45075

    I obviously made a left turn somewhere. The reports printed out of Access are not the same as when emailed and opened in Excel.

    Here is my design view:

    Click image for larger version. 

Name:	Image 32a.jpg 
Views:	17 
Size:	107.2 KB 
ID:	45076

  6. #6
    Minty is online now VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    1,714
    That's how they (reports) come out if you export them to Excel.

    It's why you need to either create an Excel file and format it as you need it (VBA required) - or save your report as a pdf and email that instead.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  7. #7
    Zimmerray is offline Novice
    Windows 10 Office 365
    Join Date
    Apr 2021
    Posts
    10
    Ah, I see. No, I have too many other reports to come out of the database to use Excel. Thanks. I will wait for ssanfu to tell me where I went wrong on the designing of the report.

  8. #8
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,288
    OK, my field names are different because I didn't have your dB to use.

    There are 2 reports in this dB, one using "Group 1" and the other using "Group A".


    I strongly urge you to remove any spaces in object names. Also do not use punctuation or special characters in object names.
    Attached Files Attached Files
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

  9. #9
    Zimmerray is offline Novice
    Windows 10 Office 365
    Join Date
    Apr 2021
    Posts
    10
    Thanks! That worked perfectly. Greatly appreciated!

  10. #10
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,288
    Happy to help....
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

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

Similar Threads

  1. Report formatting
    By Tmoore4748 in forum Reports
    Replies: 1
    Last Post: 06-15-2018, 02:22 AM
  2. Formatting Report
    By mp3909 in forum Reports
    Replies: 2
    Last Post: 02-25-2018, 03:28 PM
  3. Report Formatting
    By School Boy Error in forum Reports
    Replies: 3
    Last Post: 12-06-2013, 04:52 AM
  4. Formatting a report
    By keydetpiper in forum Reports
    Replies: 4
    Last Post: 12-20-2012, 12:11 PM
  5. formatting the report
    By simba in forum Reports
    Replies: 1
    Last Post: 08-12-2011, 12:36 PM

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 - Senior Forums