Vertical lines on report

J

John S. Ford, MD

I have a report that has a horizontal collection of fields some of which are
subreports with CanGrow set to True. I placed a horzontal line under the
fields to separate the rows of the report and make it a bit clearer to look
at.

I also want to separate the fields with some vertical lines for the same
reason. Unfortunately, the vertical lines don't seem to have a CanGrow
property so they'll be a fixed length regardless of the width of a given
row.

Is there some way working around this? Basically I want the report to have
vertical and horizontal lines to delineate fields and rows.

Thanks in advance,
John
 
F

fredg

I have a report that has a horizontal collection of fields some of which are
subreports with CanGrow set to True. I placed a horzontal line under the
fields to separate the rows of the report and make it a bit clearer to look
at.

I also want to separate the fields with some vertical lines for the same
reason. Unfortunately, the vertical lines don't seem to have a CanGrow
property so they'll be a fixed length regardless of the width of a given
row.

Is there some way working around this? Basically I want the report to have
vertical and horizontal lines to delineate fields and rows.

Thanks in advance,
John

Look up the Line Method in VBA Help.
Place the code in the Report's Page event.
 
C

Christine

Here's an example of code you can use (change the numbers
for the width you want)

Private Sub Detail_Print(Cancel As Integer, PrintCount As
Integer)
Me.ScaleMode = 1
Me.ForeColor = 0
'Repeat the following line of code for each vertical
line
' 1*1440 represents 1 inch
Me.Line (0 * 1440, 0)-(0 * 1440, 14400) 'Draws line at
Left Margin
Me.Line (0.625 * 1440, 0)-(0.625 * 1440, 14400) 'At
0.625 inch
Me.Line (2.3333 * 1440, 0)-(2.3333 * 1440, 14400) 'At
2.3333 inch
Me.Line (2.875 * 1440, 0)-(2.875 * 1440, 14400) 'At
2.875 inch
Me.Line (3.3333 * 1440, 0)-(3.3333 * 1440, 14400) 'At
3.3333 inch
Me.Line (4# * 1440, 0)-(4# * 1440, 14400) 'At 4.0
inch
Me.Line (5.2917 * 1440, 0)-(5.2917 * 1440, 14400) 'At
5.2917 inch
Me.Line (7.2083 * 1440, 0)-(7.2083 * 1440, 14400) 'At
7.2083 inch
Me.Line (8.125 * 1440, 0)-(8.125 * 1440, 14400) 'At
8.125 inch
Me.Line (8.7917 * 1440, 0)-(8.7917 * 1440, 14400) 'At
8.7917inch
Me.Line (9.3333 * 1440, 0)-(9.3333 * 1440, 14400) 'At
9.3333 inch
Me.Line (9.875 * 1440, 0)-(9.875 * 1440, 14400) 'At
9.875 inch
Me.Line (10.5 * 1440, 0)-(10.5 * 1440, 14400) 'At 10.5
inch

'the 14400 is an arbitrary number to increase the line
to the max of a
'section.
End Sub
 

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