Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Location
    London
    Posts
    341

    Question Unanswered: Force new page/ Page Break problems

    Hi guys,

    I wonder if you can help me with a problem I'm having with a report. I currently have a report called "Rpt_FullReport" which consists of 8 sections. In each section is a sub report called "Rpt_Section1", "Rpt_Section2" etc.

    The way "Rpt_FullReport" currently works is that each section is the start of a new page so when printed I get a 9 page report. The first being the introduction which is in "Rpt_FullReport" and then each following page is another report.

    The problem I have is that when one of these section reports has no data I end up with a blank page that I would like to remove. I've tried using page breaks and using the force new page feature on all settings but I can't seem to fix this - I've either got blank pages or report "Rpt_Section3" starts mid way through page 2...

    Am I missing something? Is there a way to avoid this happening?

    Many thanks in advance

    Christy

  2. #2
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    The way you describe it, it sounds like a single report with eight seperate sections, one for each sub-report. If this is the case, you are married to a nine-page report, even if there's no data at all in the report's Record Source.

    Why not start over, and make one single report. Simply change the report's Record Source each time and run the report, which will give you ONE page. The advantage of this method is that before running each report, you can run a select query that exactly matches the SQL statement of the next report in line, and checking the query's .RecordCount property. If the property > 0, run the report. Otherwise, of course, skip it.

    You can control your sequencing from a VBA subroutine or a macro.

    HTH,

    Sam

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •