Results 1 to 5 of 5
  1. #1
    NewbyForAccess is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2015
    Posts
    49

    Subreport within report not working

    I have a main report that I'd like to add a subreport to create a table of contents page within the main report. I created the subreport (my table of contents with the categories and page numbers correctly pulled) and it works perfectly if I use it alone. Once it's placed within the main report, it doesn't work. I have no clue what to do to fix it. I was lucky to find the code to help get the TOC report created and it does work and prints great; however, I've tried every method I can think of to get it to work within my main report. This is my first attempt at using a subreport and I'm clueless where to go from here. Maybe it helps if I explain that I'm making a cookbook for our family and all the recipes including sorting by category are working perfectly. My TOC report when printed alone takes the categories and determines the page number that category starts on to create this report. The cookbook report with all the recipes prints correctly. But, when I try to use the TOC within the cookbook report, the TOC does not print but all recipes and other pages work just fine. Can anyone tell me if it's because I'm using a module to create the TOC or help guide me on just simply understanding why the
    subreport
    (TOC) is not printing the contents of the file once updated and saved? The TOC generates the info using an OnPrint command. I'm so lost and confusing myself even more the more I try to figure this out. I'm desperate for help after trying so many things over the last several days.
    Thanks for any help or assistance I can get.


  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    Subreports do not have pagination. Only main report can define pages.
    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
    NewbyForAccess is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2015
    Posts
    49
    June7, so there's no way to combine these reports to get a TOC and have pagination within my main report as well?

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Perhaps other forum members would benefit from having the code to create the TOC report or a link to where you found it
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    NewbyForAccess is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2015
    Posts
    49
    This is what I used to create the TOC, but after all the hard work, not being able to place this within my main report as a subreport and having it function was very disturbing. I was looking forward to being able to create one report that would run every part of my project while still maintaining the integrity that printing a report directly from the program would give me. If I save pieces of the entire project as a pdf file or a rtf file, the integrity of the final print is not at all there. If anyone would like to view how I created mine, this might help. I do recommend taking snip-its as the code is being shown. I had to manually key it. It is a very good tool depending on what you want it for.

    https://www.youtube.com/watch?v=sPu8zr1WLiM

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

Similar Threads

  1. Replies: 7
    Last Post: 04-16-2018, 07:43 PM
  2. Page Break Not working in Subreport
    By cmacehwi in forum Reports
    Replies: 1
    Last Post: 01-13-2018, 10:59 PM
  3. Subreport criteria not working
    By Flyboy1945 in forum Reports
    Replies: 5
    Last Post: 11-03-2016, 02:22 PM
  4. Replies: 1
    Last Post: 04-15-2013, 10:02 AM
  5. Subreport on form. sum() not working well?
    By theevilsam in forum Reports
    Replies: 1
    Last Post: 01-23-2012, 11:45 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