Question on Report Height

J

John Lane

Is there a way to know, when the Page footer fires, the total height of the
report page up to the bottom of the last detail line when there are multiple
goup headers or footers? Thanks.
 
M

Marshall Barton

John said:
Is there a way to know, when the Page footer fires, the total height of the
report page up to the bottom of the last detail line when there are multiple
goup headers or footers?


Add a module level variable to the report's module. Then
use the detail section's Print event to set the varible:
lngDetailBotttom = Me.Top + Me.Height

Then the Page event can use the variable as the page
position to draw a line or whatever.

FYI, the report (not section) property,Top, provides the
current section's position on the page. In the Print event
the report's Height property provides the current section's
Height after it has grown/shrunk.
 
J

John Lane

Marshall Barton said:
Add a module level variable to the report's module. Then
use the detail section's Print event to set the varible:
lngDetailBotttom = Me.Top + Me.Height

Then the Page event can use the variable as the page
position to draw a line or whatever.

FYI, the report (not section) property,Top, provides the
current section's position on the page. In the Print event
the report's Height property provides the current section's
Height after it has grown/shrunk.

Almost works. I think the multiple group footer breaks are confusing it and
pushing the height. I'm trying to draw a line right under that last detail
line that meets the vertical line. I am using a Page Footer line now but
sometimes, depending on how many group breaks there, pushes it down.
 
M

Marshall Barton

John said:
Almost works. I think the multiple group footer breaks are confusing it and
pushing the height. I'm trying to draw a line right under that last detail
line that meets the vertical line. I am using a Page Footer line now but
sometimes, depending on how many group breaks there, pushes it down.


"Amost works" contains no information about what actually
happens.

I suspect that the report's top margin needs to be included
in the calculation. I can never remember if the margin
needs to be added or subtracted. Try drawing the line
something like:

Me.Line(X, lngDetailBotttom +/- yourtopmarginininches *
1440) - Step(L, 0)
 

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