Subreport headers at the bottom of page

S

Shara

In my report, my subreports often start at the bottom of
the page. I would like to be able to determine how far I
am from the footer to decide whether or not to start the
report on the next page. For example, if all I can fit
onto the current page is the subreport header, I'd like to
just start on the next page. Is there a way to determine
how much is going to fit on the current page and
dynamically set the ForceNewPage property?

Thanks!
 
A

Allen Browne

Check the Top property of the report to see how far you are down the page.

The Top property is measured in twips, where 1440 twips = 1 inch, so to see
if you are more than 9 inches down the page you would test:
If Me.Top > 9 * 1440 Then

If you can't dynamically set the ForceNewPage property, you could add a Page
Break control to the report and toggle its Visible property to achieve a
page break.
 
S

Shara

Thanks for your suggestion. I'm not sure what I'm doing
wrong, but I still can't get it to work. The "Top"
property doesn't seem to be consistent. For instance,
when I initially open up the report containing my
subreport, it reports a "Top" of 0, regardless of how far
down it actually is on the page. There are other times
where it seems to be pretty close, but then another time
where it will say "Top" is 6.5 inches down the page and
it's actually only 2 inches. Any suggestions?

I also couldn't get the ForceNewPage or the PageBreak
thing to work...I tried it in the OnFormat event for the
subreport's report header section and also tried it in the
OnOpen event for the subreport itself.
 

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