?
Solved

Report Ignoring Page breaks in subreport

Posted on 2004-08-27
7
Medium Priority
?
335 Views
Last Modified: 2008-03-06
I am stumped on something that seems like it should be very simple to do.

I have a report which contains a subreport.  If the subreport contains data, i want it to show on a new page, and if there is no data, i do not want a page break.  I have tried putting page break controls at the beginning of the subreport, and I have also tried setting force new page to "before" in the subreport's heading.  When the parent report is viewed, it refuses to page break.
I am using the Report_NoData event to set all the sections of the subreport to visible=false when there are no records.

Anyone know a simple fix for this?
0
Comment
Question by:Peepsalot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 51

Expert Comment

by:Gustav Brock
ID: 11919828
Subreports ignore any page settings and commands when run as .. a subreport. Thus you need to move page break commands to the main report.

If the NoData event of the subreport works for you, you can use it to set a global variable to be read by the main report if a page break should be send or not.

/gustav
0
 
LVL 2

Author Comment

by:Peepsalot
ID: 11931881
Ok, I am trying to do what you suggested, but I can't figure out how to dynamically insert a page break.  Page break doesn't seem to have a "Visible" property that I can toggle.  Any other suggestions on how I could do this?
0
 
LVL 2

Author Comment

by:Peepsalot
ID: 11932544
Also, I'm not sure how this can be done, since the page break needs to be inserted before the subreport, and there is no way to tell whether the page break is needed until the NoData event has a chance to run.
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 51

Accepted Solution

by:
Gustav Brock earned 400 total points
ID: 11952513
Have a look here:

http://www.experts-exchange.com/Databases/MS_Access/Q_21111927.html

Looks like what you are after.

/gustav

0
 
LVL 2

Author Comment

by:Peepsalot
ID: 11965575
Thanks, a variation of that suggestion did eventually work for my application, I had to keep trying placing the page breaks in different "Before"/"After" configurations, in different headers, etc.  But eventually it all worked out.  Access seems to be very picky, and not so straightforward in the way it handles those breaks.
0
 
LVL 2

Author Comment

by:Peepsalot
ID: 11965588
You know what they say though  "Those are the breaks" ;-)
0
 
LVL 51

Expert Comment

by:Gustav Brock
ID: 11965606
Certainly!

/gustav
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question