Arkadaşlar merhaba,
Daha önce yine forumdaki çözümlerden istifade ederek raporda metin alanlarının çizgilerinin gösterilmesi ile ilgili olarak aldığım kodu bir başka çalışmamda daha kullanmak istediğimde ekte gönderdiğim kod hatası ile karşılaştım.
acaba problem ne olabilir.
Not : rapordaki bahsi geçen "MakeBoxesGrow" (Aşağıdaki gibi) ile ilgili kod modüller bölümünde kayıtlı.
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
Daha önce yine forumdaki çözümlerden istifade ederek raporda metin alanlarının çizgilerinin gösterilmesi ile ilgili olarak aldığım kodu bir başka çalışmamda daha kullanmak istediğimde ekte gönderdiğim kod hatası ile karşılaştım.
acaba problem ne olabilir.
Not : rapordaki bahsi geçen "MakeBoxesGrow" (Aşağıdaki gibi) ile ilgili kod modüller bölümünde kayıtlı.
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
Ekli dosyalar
-
59.6 KB Görüntüleme: 16