Results 1 to 8 of 8
  1. #1
    scott0_1 is offline Advanced Beginner
    Windows Vista Access 2013 32bit
    Join Date
    Apr 2018
    Posts
    82

    Report with subreport in header is causing new lines in main report details section

    Hi All,

    I've created a report that will print out an attendance sheet for instructors to use on a course. The header will be populated with things like location, time/date and the course instructors. The details section will be a list of course attendees and their tombstone information.

    Since the course may have multiple instructors, I've added a subreport in the header section to list the instructors in columns. The problem that I've run into is that for every instructor listed in the subreport, it is adding a line in the details section of the main report. Then, when the main report is populated with attendees, they are listed multiple times to fill all of the boxes.

    To clarify: If I have eight instructors in the subreport, it creates eight lines in the main report. If I have one attendee assigned to the course, it then populates all eight lines of the main report with that attendee's info.

    My question is, can I change something in the way I've applied the subreport or is there a better way of listing the instructors in the header that will cause me fewer problems.



    The instructors are also being listed in columns, three across the page before dropping down. That is fairly important to the report design.

    Thanks!

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    One solution would be to remove the parent child field link between report and subreport.
    Does that need to be included?
    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

  3. #3
    scott0_1 is offline Advanced Beginner
    Windows Vista Access 2013 32bit
    Join Date
    Apr 2018
    Posts
    82
    Quote Originally Posted by ridders52 View Post
    One solution would be to remove the parent child field link between report and subreport.
    Does that need to be included?
    It is needed as there are many courses. The report is generated by the user choosing a specific session. The report uses that selection to get the instructors in the subreport. If I delete the master/child field links, then the subreport won't know what instructors to put in.

    If I read that correctly, that is!

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Is the 'header' the Report Header?

    Think I would have to review data structure and report design. 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
    scott0_1 is offline Advanced Beginner
    Windows Vista Access 2013 32bit
    Join Date
    Apr 2018
    Posts
    82
    Quote Originally Posted by June7 View Post
    Is the 'header' the Report Header?

    Think I would have to review data structure and report design. If you want to provide db for analysis, follow instructions at bottom of my post.
    I won't be able to put the db up as there is too much information to take out.

    I'm attaching two screenshots. The first one is no attendees scheduled and the second is with one attendee scheduled. Hopefully that helps clarify.

    Click image for larger version. 

Name:	Report.JPG 
Views:	13 
Size:	162.2 KB 
ID:	33601Click image for larger version. 

Name:	Report2.jpg 
Views:	12 
Size:	63.8 KB 
ID:	33600

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Nope, doesn't help me understand the issue. Must be something about the query used as RecordSource.

    Sorry, you're own your own unless someone else with better insight comes along.
    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
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Nor me. Its exactly as you originally described but I don't see why it needs to be this way.

    I suggested 'breaking the link' between report & subreport. You rejected that idea but I don't think you tried it
    Nothing in the screenshots explains why you need it

    You could even try putting the subreport in the report footer. I doubt it will work but you could try

    Suggest you post the report & subreport SQL for us to look at
    Better still, post a stripped down version of your db with names & any other sensitive data changed
    You would just need to include the items necessary for the report to work
    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

  8. #8
    scott0_1 is offline Advanced Beginner
    Windows Vista Access 2013 32bit
    Join Date
    Apr 2018
    Posts
    82
    I found the problem. It was with the query. I originally was not going to use a subreport, so for each attendee, I was querying the instructor. So if I had nine instructors and one attendee, like in the example above, I was getting nine records returned in the query.

    Hi everybody. My name is Scott and I'm new.

    Thanks for your help and your patience. I will have more silly issues I'll be bugging you about. I appreciate everyone's help!

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

Similar Threads

  1. Replies: 3
    Last Post: 07-05-2017, 11:35 AM
  2. Replies: 2
    Last Post: 03-30-2016, 03:57 PM
  3. Replies: 6
    Last Post: 03-26-2013, 12:17 PM
  4. Replies: 1
    Last Post: 02-28-2012, 05:05 PM
  5. Replies: 26
    Last Post: 11-06-2009, 10:16 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