Draw continous vertical line in report detail section

D

DML

My report has a report header approx 1.5" tall, a page header approx 0.5"
tall, followed by the detail section.

How can I print a fixed height detail section with verticle lines even if
there are only a few records? Essentially, trying to replicate a paper form.
The line starts at the bottom of the page header and continues to the top of
page footer.

In a post a couple days ago, Allen Browne recommended the below for drawing
a line down the entire page.....this close, and I am trying to figure out a
similar approach for the detail section.

Private Sub Report_Page()
Me.Line (Me.ScaleTop, Me.ScaleLeft)-(Me.ScaleTop, Me.ScaleHeight), vbRed
End Sub

Thanks,

David
 
D

Duane Hookom

Just play with his code and hard-coded numbers like:
Private Sub Report_Page()
Me.Line (1400, 2000)-step(0, 10000)
End Sub
 
D

DML

Thanks Duane. This gets me the results I want...but how can I avoid hard
coding numbers.

I can get the left coordinate by refering to the left property of labels in
the page header.
(i.e. sngLeft = Me.lblLev2.Left)

How can I get the top and bottom coordinates based on the top of the detail
(or bottom of the page header) and top of the page footer?


THanks again.

David
 
R

Rick Brandt

DML said:
Thanks Duane. This gets me the results I want...but how can I avoid
hard coding numbers.

I can get the left coordinate by refering to the left property of
labels in the page header.
(i.e. sngLeft = Me.lblLev2.Left)

How can I get the top and bottom coordinates based on the top of the
detail (or bottom of the page header) and top of the page footer?

Since PageHeaders and Footers do not grow or shrink then there should be an
exact set of coordinates that will give you what you want. There should be no
reason for them to be dynamically calculated.
 
D

Duane Hookom

If you need to replace hard-coded values, try:
sngLeft = Me.lblLev2.Left
Then us sngLeft in your Line method.
 

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