How to expand Report Border?

A

Agnelo Fernandes

I have got the required report border through the following VBA Script in
Page Event of Report:

Dim lngTop As Long
Dim lngLeft As Long
Dim lngBottom As Long
Dim lngRight As Long
Dim i As Integer
Dim intBorderCount As Integer
lngTop = 0
lngLeft = 0
lngBottom = 9000
lngRight = Me.Width
intBorderCount = 6 'set to 1 for just the outside border
Me.ForeColor = 4194432
For i = 1 To intBorderCount
Me.DrawWidth = i
Me.Line (lngLeft, lngTop)-(lngRight, lngBottom), , B
lngLeft = lngLeft + i * 5
lngRight = lngRight - i * 5
lngTop = lngTop + i * 5
lngBottom = lngBottom - i * 5
Next

However, I get the border too close to the data. I need to border to be
drawn more towards the edge of the certificate. I tried changing the page
set-up as well as changed the numbers around on a trial and error basis.
Nothing worked .....any suggestions?
 
M

Marshall Barton

Agnelo said:
I have got the required report border through the following VBA Script in
Page Event of Report:

Dim lngTop As Long
Dim lngLeft As Long
Dim lngBottom As Long
Dim lngRight As Long
Dim i As Integer
Dim intBorderCount As Integer
lngTop = 0
lngLeft = 0
lngBottom = 9000
lngRight = Me.Width
intBorderCount = 6 'set to 1 for just the outside border
Me.ForeColor = 4194432
For i = 1 To intBorderCount
Me.DrawWidth = i
Me.Line (lngLeft, lngTop)-(lngRight, lngBottom), , B
lngLeft = lngLeft + i * 5
lngRight = lngRight - i * 5
lngTop = lngTop + i * 5
lngBottom = lngBottom - i * 5
Next

However, I get the border too close to the data. I need to border to be
drawn more towards the edge of the certificate. I tried changing the page
set-up as well as changed the numbers around on a trial and error basis.


The border is being drawn at the left anf top margins so
you can not draw it any farther from the contents of the
report. If you have enough room, you should be able to move
the controls in the report to the right. (use Edit - Select
All and drag everthing to the right.
 

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