önce bir modül ekle ve modüle aşağıdaki kodu kopyala
Option Compare Database
Public Sub MakeBoxesGrow(ThisReport As Report)
Dim X1 As Single
Dim X2 As Single
Dim Y1 As Single
Dim Y2 As Single
Dim Offset As Single
Dim Color As Long
Dim ThisControl As Control
Dim MaxHeight As Single
For Each ThisControl In ThisReport.Section(acDetail).Controls
If ThisControl.Visible = True Then
If ThisControl.Height > MaxHeight Then
MaxHeight = ThisControl.Height
End If
End If
Next ThisControl
ThisReport.ScaleMode = 1
Offset = 0
ThisReport.DrawWidth = 3
Color = RGB(0, 0, 0) '
For Each ThisControl In ThisReport.Section(acDetail).Controls
If ThisControl.Visible = True Then
X1 = ThisControl.Left - Offset
Y1 = ThisControl.Top - Offset
X2 = ThisControl.Left + ThisControl.Width + Offset
Y2 = ThisControl.Top + MaxHeight + Offset
ThisReport.Line (X1, Y1)-(X2, Y2), Color, B
End If
Next ThisControl
Set ThisControl = Nothing
End Sub
sonra raporda ayrıntı kısmında yazıldığında yordamına aşağıdaki kodu ekle
Private Sub Ayrıntı_Print(Cancel As Integer, PrintCount As Integer)
MakeBoxesGrow Me
End Sub
tabi raporda alanların etrafındaki çerçeveleri kaldırman lazım.