Results 1 to 3 of 3
  1. #1
    mnsemple83 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2011
    Posts
    40

    Printing reports without blank subreports.

    I am trying to print a report without any blank pages. My report consists of several subreports. However, two of these subreports have their own pages and before each one, I inserted a page break. If one or neither of these subreports have any data, the pages that they are on will be blank. I am trying to figure out a way for the report to skip these pages if they do not contain any data.

    I was thinking about writing some code that will check the subreport for any data and if not, do not display the subreport. Does anyone have any other suggestions? I'm currently trying things out as I am writing this.



    Thanks in advance.

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    the .HasData method can be used in the OnFormat event of the section to eliminate visibility of that subreport.

    of course perhaps just make Can Shrink property to yes may do it sufficiently....

    not sure either eliminates the printed page however depending on overall layout.

    Hope it helps.

  3. #3
    mnsemple83 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2011
    Posts
    40
    Here's what I did:

    In the OnFormat event of the Detail section, for each subreport, here's the code I had written:

    If Me.[subreport].Report.HasData = False Then
    Me.PageBreak.Visible = False
    End If

    I also sent the Can Shrink property to yes and everything worked. I do not have any blanks. I hope this helps everyone else out. Thanks for the suggestion.

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

Similar Threads

  1. Blank Pages in my Reports
    By bkvisler in forum Reports
    Replies: 2
    Last Post: 08-21-2011, 03:15 PM
  2. Printing Blank Report
    By andrewm in forum Reports
    Replies: 2
    Last Post: 11-24-2010, 05:30 PM
  3. Report printing unknown blank lines.
    By dgrzalja in forum Reports
    Replies: 10
    Last Post: 11-02-2009, 12:21 PM
  4. REPORTS BLANK PAGES/I can't remember
    By SpotoR1 in forum Reports
    Replies: 0
    Last Post: 03-03-2009, 07:28 AM
  5. Printing Reports....
    By Danny Christie in forum Reports
    Replies: 1
    Last Post: 12-06-2006, 05:51 PM

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