LaughingDev
Registered User.
- Local time
- Today, 10:06
- Joined
- Sep 12, 2011
- Messages
- 11
I am working on a report to print a list of all the products in my DB with the unit prices, essentially a price list. The report is split into two columns via the pagesetup and is grouped by the field ProductType.
I would like to draw a single distinct vertical line between the two columns, I have tried using the Line method in the OnPrint event of the detail section. However this method results in 2 lines as there are 2 columns in that section.
I am currently trying to use the Line method in the Page event of the report instead. However since the line method uses the X & Y coordinates from the first page only which has a larger pageheader unlike the rest of the pages, the line draws correctly only for the first page but is too short for the rest of the pages.
Private Sub Report_Page()
Would appreciate any help or advice on this issue, Thanks
I would like to draw a single distinct vertical line between the two columns, I have tried using the Line method in the OnPrint event of the detail section. However this method results in 2 lines as there are 2 columns in that section.
I am currently trying to use the Line method in the Page event of the report instead. However since the line method uses the X & Y coordinates from the first page only which has a larger pageheader unlike the rest of the pages, the line draws correctly only for the first page but is too short for the rest of the pages.
Private Sub Report_Page()
Dim X1 As Single, Y1 As Single, X2 As Single, Y2 As Single
Dim col As Long
Me.DrawStyle = 0
Me.DrawWidth = 25
X1 = 5095
Y1 = (Me.PageHeaderSection.Height + Me.ReportHeader.Height)
X2 = X1
col = RGB(35, 115, 93)
Y2 = Me.ScaleHeight - (Me.PageFooterSection.Height + 100)
Me.Line (X1, Y1)-(X2, Y2), col
End Sub Dim col As Long
Me.DrawStyle = 0
Me.DrawWidth = 25
X1 = 5095
Y1 = (Me.PageHeaderSection.Height + Me.ReportHeader.Height)
X2 = X1
col = RGB(35, 115, 93)
Y2 = Me.ScaleHeight - (Me.PageFooterSection.Height + 100)
Me.Line (X1, Y1)-(X2, Y2), col
Would appreciate any help or advice on this issue, Thanks