Results 1 to 9 of 9
  1. #1
    nammeci is offline Novice
    Windows 11 Office 365
    Join Date
    Feb 2025
    Posts
    2

    Creating report with grouping based on unique ID

    Good afternoon, community,
    I am trying to help a friend create a table where data will be pulled from an Excel spreadsheet. The Excel spreadsheet looks as follows:
    Report Number Date Title Recommendation Number Recommendation Text Funds
    Please see the attached picture for reference.

    The outcome should be sorted based on the last five characters of the report number (in descending order), and the date (in ascending order). Additionally, the data should be grouped based on the Report Number, Date, and Title. Finally "open Recommendations and Potential Monetary Benefits" as seen in the picture should be repeated on each page. The full file can be found here.



    Now, my question is: Is this even doable in IMS Access, and if yes, how?
    Thank you in advance.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Should be.

    Will have to extract parts from the report number with string manipulation functions, such as: Right(ReportNumber, 5).

    Also, the date value could be an issue because it is a string and 10 will sort before 2 so that will have to be dealt with as well, like: Format([Date],"mm/yyyy")

    Build a query that has those calculated values, like:
    SELECT Recs.*, Right([ReportNumber],5) AS RepNum, Format([ReportDate],"mm/yyyy") AS MoYear FROM Recs;

    Use that query a RecordSource for report and set Sorting & Grouping design features.

    Place labels in PageHeader section for "Open Recommendations" and "Potential Monetary Benefits".

    Why (This) included in each column header?

    Are you having difficulty getting data into Access?

    Can attach file to post for analysis. The link provided only has a PDF document, no data file.

    Attached is a mockup to get you started.
    Database1.accdb
    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
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    I would recommend linking the spreadsheet in Access so as to have access to the latest data. Then manually create a table in Access with fields that have the correct data types. Then use either update and append queries to move the data into the Access table or use something that's known as an Upsert query. As long as the sheet data doesn't violate the table field data types (e.g. if it's an integer, the sheet column data will not exceed that boundary) then everything should be copacetic.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    jojowhite's Avatar
    jojowhite is offline Competent Performer
    Windows 11 Access 2021
    Join Date
    Jan 2025
    Posts
    433
    upload your workbook for all to see and work with.

  5. #5
    nammeci is offline Novice
    Windows 11 Office 365
    Join Date
    Feb 2025
    Posts
    2

    Thank you all for resposnes

    Thank you for helping with this.
    Attached Files Attached Files

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Did you look at the sample I uploaded?

    Not seeing any attempt to employ aspects of example I provided.
    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
    madpiet is offline Expert
    Windows 10 Office 365
    Join Date
    Feb 2023
    Posts
    565
    <shudder>
    Ask your friend for the original file. I'd bet it's a PDF. If that's the case, use Excel. If you can get your friend's permission, post the file somewhere so we can see it. In a nutshell, use PowerQuery to connect to the PDF file(s) and then find the table you want to import. That will put it in Excel/PowerQuery as tabular data. Then you can use PowerQuery to do all the cleanup. Splitting columns, changing text strings to dates and so on. Nothing to it. When all of that is done, you should have a second sheet with the cleaned data.
    Go into Access, create a linked table, and then query the data... or do the whole thing in Excel. You may not need Access at all.

  8. #8
    jojowhite's Avatar
    jojowhite is offline Competent Performer
    Windows 11 Access 2021
    Join Date
    Jan 2025
    Posts
    433
    see the SemiAnnualReport report.
    Click image for larger version. 

Name:	semi_annual_rep.png 
Views:	9 
Size:	75.9 KB 
ID:	52740
    Attached Files Attached Files

  9. #9
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,820
    See rptRecommendations in the attached
    Attached Files Attached Files

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

Similar Threads

  1. Filtering unique records based on a grouping
    By AndyDandy in forum Queries
    Replies: 4
    Last Post: 03-16-2018, 07:52 AM
  2. Report creating in Access by Grouping
    By saleemsadique in forum Access
    Replies: 4
    Last Post: 06-11-2014, 11:20 AM
  3. Replies: 3
    Last Post: 01-28-2014, 02:33 PM
  4. Replies: 22
    Last Post: 03-03-2013, 02:00 PM
  5. Unique queries - Unique Count
    By bigfish in forum Queries
    Replies: 7
    Last Post: 03-14-2012, 01:28 PM

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