unexpected page breaks

M

Mac

I continue to have unexpected page breaks in a long report that is made up of
nearly 30 subreports and several interspersed text fields. The report has
report and page headers, report and page footers, and a single detail
section. The report and detail sections are set with KeepTogether=No. The
report header/footer has CanGrow=No, CanShrink=No, whereas the detail section
CG=Y, CS=Y. The subreports each include a report header (KT=No, CG=No,
CS=No) and detail section (KT=No, CG=Yes, CS=Yes). The reports display
properly with no blank space, however for some odd reason (that I've not
figured out), page 1 is prone to breaking about 2/3rd the way down on an
occasional report. Most reports display properly, with data filling the
entire page. I've gone over the subreports numerous times, verifying that
all have KT set to no. What else should I be doing? Thanks...
Mac
 
B

BruceM

All I can suggest is using different backcolors or borders for the various
subreports and sections. It may show you which section/subreport is ending
up where.

Does the problem show up on records that have previously displayed
correctly, or do some records always break unexpectedly?
 
M

Mac

Thanks for your response. I've played around with color changes but haven't
found anything odd. The problem is consistent in about 10-15% of my reports.
It's a pretty busy report, but I don't see a problem with paging except for
page 1. The break can occur in more than one place, but there is a certain
consistency about it. Page 1 has the report and page headers, followed in a
descending arrangement 4 text fields, a subreport, a memo field, a caption, 2
more text fields, another subreport, caption, 4 text fields, 2 subreports,
then 6 text fields (there's a lot more, but these parts generally print on
later pages). Fields without data are designed to shrink, and indeed there's
no empty space found on page 1 except at the bottom for some of these
prematurely breaking reports. When I see the break, there will be about 6-10
"lines" of blank space at the bottom of the page. If I edit the memo field
or one of the subreports so that additional lines of output are created, the
break location will stay the same (following a particular text field) but
progressively less empty space is found at the bottom of the page. Or if I
remove text from the memo field or data from a subreport, I can find a point
at which the loss of one single line will cause the entire page to fill with
data (conversely, adding back that line will once again create the early
break). It's weird. I've deleted distal parts of the report so that it only
comes to 2 pages, and I still see early page breaks. I was hoping this was a
behavior other people have seen. Perhaps I'll go back to the beginning and
add the components one at a time while looking for when this problem appears.
I'd appreciate any other thoughts you might have.....
M
 
B

BruceM

I was about to suggest rebuilding the report one element at a time (maybe by
copying and pasting into a new report), but then you said you are going to
try that. If the break always occurs after the text box bound to a
particular field you could try replacing either that control or the
following one (since it is not clear if the break is occurring after that
control or before the next one). Maybe copy a control that seems to work
properly, and change its Control Source. I don't recognize anything
familiar from what you have described, so detective work may be the best
option.
 
M

Mac

Sorry I took so long to get back on this problem. I'm not sure why the
problem is happening, but discovered that if I create a small amount of
vertical space between each text box or subreport, the problem goes away.
When I originally designed the report, I put a small amount of vertical space
between the components. Once I was sure text boxes on the same line were
aligned, I selected everything on the detail section, clicked Format-Vertical
Spacing-Increase the verify my alignments were correct, then clicked
Format-Vertical Spacing-Decrease several times until I could no longer see
any intervening vertical space. The reports created look good most of the
time, with no empty space from missing data. But the occasional early page
breaks on page 1 were annoying. At any rate, by adding back a small amount
of intervening space, the problem appears to have disappeared and the reports
look fine. Any ideas why eliminating vertical space this way might cause
page breaks?
 
B

BruceM

It has been a while since I was last in this thread, and my recollection of
the exchange has become quite vague. I'm not going to review the entire
thread at this point, but I will suggest a few things.

If you are using a group header or footer, be sure the Keep Together option
is as it should be.

When aligning text boxes, select a group of them and align top or bottom.
They should line up one above the other. If they do not, be sure there is
space between all of them, and try again. If the problem persists, select
all but the top box. Press Ctrl + Down Arrow to move them one pixel.
Deselect the top box in that group, and repeat until there is a slight space
between all of the text boxes. This should not be necessary, but it is
worth a try. It is possible that when you set the text boxes by eye you
were overlapping them without being aware of it. Reports can be a bit
touchy. It is very difficult to diagnose from a distance a problem such as
you describe, but it should be possible to eliminate one option at a time.
I usually rebuild the report one element at a time if I am having
unexplained formatting problems. That way you know exactly what caused the
problem.

If the text boxes are above each other they will grow or shrink as needed.
If there are text boxes or other controls that can grow or shrink to the
left or right of other text boxes it can throw off the formatting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top