Drawing H and V lines in a 3 columns report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,
I have a 3 columns report which a need to draw a line in between the
columns. I was able to accomplish that with:

Dim C1, C2 as long
Const Gap As Long = 0.05 * 1440
C1 = Report.Width + Gap
C2 = C1 * 2 + Gap

Me.Line (C1, PageHeaderSection.Height)-(C1, 10000), 0
Me.Line (C2, PageHeaderSection.Height)-(C2, 10000), 0

The thing is, different users wave access to different paper sizes so, 10000
as page height does not work well. Is there a property I could use, such as
Report.Page.Height from where I could get the current page Height?

Same goes to Page Width, because printing in 3 columns, the page footer
shrink to the size of a column, instead of staying the size of a page.

Thank You

Mauricio Silva
 
Mauricio said:
I have a 3 columns report which a need to draw a line in between the
columns. I was able to accomplish that with:

Dim C1, C2 as long
Const Gap As Long = 0.05 * 1440
C1 = Report.Width + Gap
C2 = C1 * 2 + Gap

Me.Line (C1, PageHeaderSection.Height)-(C1, 10000), 0
Me.Line (C2, PageHeaderSection.Height)-(C2, 10000), 0

The thing is, different users wave access to different paper sizes so, 10000
as page height does not work well. Is there a property I could use, such as
Report.Page.Height from where I could get the current page Height?

Same goes to Page Width, because printing in 3 columns, the page footer
shrink to the size of a column, instead of staying the size of a page.


To get the page footer to span the page, use File - Page
Setup menu to set the number of columns, BUT uncheck the
Same as Detail box and set the column width manually. Then
you can make the report width as wide as needed.

After doing that, you will need to change the specification
of C1 to use the column width instead of Report.Width.

Access can not draw a line beyond the area available to the
event. I think you are using the Page event to run your
code. If you want to draw the lines all the way to the
bottom of the page, just make the 10000 bigger, e.g. 30000.

For more general calculations, explore using the ScaleTop,
ScaleHeight, ScaleLeft and ScaleWidth properties to see if
they provide the needed values.
 
Back
Top