Results 1 to 3 of 3
  1. #1
    hilian is offline Advanced beginner
    Windows XP Access 2003
    Join Date
    May 2012
    Posts
    44

    Choose only needed subreports

    I have a main report and several subreports. The main report will be part of every report produced, but not all subreports will be included each time because some of the time there won’t be any data for a particular report. The subreports also don't need to be in any particular order.



    I can imbed all of the subreports in the main report, but when there isn’t any data there will be a blank area on the report. I’m trying to avoid that.

    Is there a way that the user could pick only the reports needed, say from a command button on a form, and they would appear one after the other, appearing as a single report, without any empty spaces? Alternately, could I imbed all of the subreports in the main report and automatically exclude a report where there isn't any data, without leaving an empty area?

    Many thanks,

    Henry

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    To include/not include a subreport would be a design modification of the main report. This means opening in design view and deleting the subreport control and moving other controls to occupy the space and reducing the size of the section then saving the report with the changes. This can be done programmatically but is complicated.

    I faced this issue and ended with solution that displays a label control when there is no data.

    Another option is to size the subreport control with 0 height and position all the reports just barely one below the other and let them grow as needed. They will still occupy space but maybe not so noticeably.
    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
    hilian is offline Advanced beginner
    Windows XP Access 2003
    Join Date
    May 2012
    Posts
    44
    I tried it. It works. It's exactly the solution I need!! Thank you.

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

Similar Threads

  1. Help needed : Library catalogue in access format is needed
    By dealers in forum Sample Databases
    Replies: 3
    Last Post: 01-16-2014, 02:03 PM
  2. subreports
    By emerrube in forum Access
    Replies: 2
    Last Post: 08-24-2011, 07:35 AM
  3. Subreports - Different
    By frousseau in forum Reports
    Replies: 1
    Last Post: 09-07-2010, 05:14 PM
  4. Using Subreports
    By jonesy29847 in forum Access
    Replies: 5
    Last Post: 04-20-2010, 11:16 AM
  5. Sumarizing Subreports
    By trop in forum Reports
    Replies: 0
    Last Post: 07-29-2009, 10:43 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