trieule9786 > 14-03-14, 03:53 PM
trunghieu > 14-03-14, 05:21 PM
trieule9786 > 14-03-14, 06:02 PM
trieule9786 > 15-03-14, 11:52 AM
nhannt4 > 17-03-14, 12:27 PM
MTNQ > 20-03-14, 10:47 PM
Option Compare Database
Dim intRecCount As Integer
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
intRecCount = 0
End Sub
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
intRecCount = intRecCount + 1
End Sub
Private Sub Report_Page()
Dim lngColor As Long
Dim sngTop As Single, sngLeft As Single
Dim sngWidth As Single, sngHeight As Single
Me.ScaleMode = 0
If Me.Page = Me.Pages Then
sngLeft = Me.mavt.Width 'Thay mavt bằng tên cột mà bạn muốn vẽ đường ngang bên dưới
If Me.Pages = 1 Then
sngTop = (intRecCount) * (Me.Detail.Height) + _
Me.PageHeaderSection.Height + Me.ReportHeader.Height + (Me.Detail.Height/2)
Else
sngTop = intRecCount * (Me.Detail.Height) + Me.PageHeaderSection.Height + (Me.Detail.Height/2)
End If
sngWidth = Me.Width
sngHeight = Me.ScaleHeight - Me.PageFooterSection.Height - Me.ReportFooter.Height
lngColor = RGB(255, 0, 0)
Me.Line (Me.mavt.Left, sngTop)-(sngLeft, sngTop), lngColor
Me.Line (sngLeft, sngTop)-(sngWidth, sngHeight), lngColor
End If
End Sub
ngochuong279 > 07-11-15, 11:13 PM