Results 1 to 2 of 2

Check multiple subreports for data, if no data hide group header and detail.

  1. #1
    lborn is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2017

    Check multiple subreports for data, if no data hide group header and detail.

    I have a main report that is bound by a query that lists room numbers in a department (the department is selected from a form, and then the report is run from a command button that filters the report on open).

    The report has 2 group headers: one that acts as the first page of the report, and one that shows details about each room (number, name, and the headers for the columns from the subreports because they are the same regardless of type of item). The report forces a page break after a room's information, a room could have one or more pages depending on how many items are in that room.

    In the report's detail there are three subreports that show different items that are in that room (art, furniture, equipment). The subreports are are linked by DeptID and RoomID.

    A room may have each subreport showing data, or a combination of, or no data at all.

    If the subreports have no data, I don't want to show the group header or detail for that room.

    I have tried a few different ways of accomplishing this, but I seem only to be able to hide all of the room related group headers, or all of the detail, not on a case-by-case basis. Is this done through VBA in the OnFormat or OnPrint events, or is it something I could change in the query for the main report?

    Thank you for any help you might be able to give on this!

  2. #2
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Fix the query, that is the best way. You can left join the three queries for the subreports and make sure that at least one of them has data.

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

Similar Threads

  1. Replies: 6
    Last Post: 12-14-2015, 02:25 PM
  2. Replies: 6
    Last Post: 10-30-2014, 11:59 AM
  3. Replies: 9
    Last Post: 04-21-2013, 04:37 PM
  4. Replies: 0
    Last Post: 02-25-2013, 03:43 PM
  5. columns for group detail but not group header?
    By Coolpapabell in forum Reports
    Replies: 0
    Last Post: 08-21-2009, 07:53 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
Tech Forums: Microsoft Office Forums