Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Report Ignoring Page breaks in subreport

Posted on 2004-08-27
7
Medium Priority
?
337 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 52

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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
LVL 52

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 52

Expert Comment

by:Gustav Brock
ID: 11965606
Certainly!

/gustav
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

636 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