lines in report

  • Thread starter Thread starter KRISH
  • Start date Start date
K

KRISH

Hi!

I am using sample code given below to draw lines

Private Sub GroupHeader3_Format(Cancel As Integer,
FormatCount As Integer)
Dim Ctl As Control
Dim intLineMargin As Integer

intLineMargin = 15

For Each Ctl In Me.Section
(acGroupLevel3Header).Controls
With Ctl

Me.Line ((.Left + .Width + intLineMargin),
350)-(.Left + .Width + _
intLineMargin, Me.Height)

End With
Next


With Me
Me.Line (0, 350)-Step(.Width, .Height), 0, B
Me.Line (0, 350)-Step(Width, 0)
End With

Set Ctl = Nothing
End sub

But the lines are not coming. Lines are coming only if I
place the controls in the detail section. Please help.

Krish
 
KRISH said:
I am using sample code given below to draw lines

Private Sub GroupHeader3_Format(Cancel As Integer,
FormatCount As Integer)
Dim Ctl As Control
Dim intLineMargin As Integer

intLineMargin = 15

For Each Ctl In Me.Section
(acGroupLevel3Header).Controls
With Ctl

Me.Line ((.Left + .Width + intLineMargin),
350)-(.Left + .Width + _
intLineMargin, Me.Height)
< ---- snip ----
But the lines are not coming. Lines are coming only if I
place the controls in the detail section. Please help.

Krish,

the very first line in the Help topic on the line-method says (approx
translation):

"The Line method draws lines and rectangles in a report object when
the PRINT event fires."

(Upper size markup by me). So try moving the code in the Print event
procedure.

Best regards
Emilia

Emilia Maxim
PC-SoftwareService, Stuttgart
http://www.maxim-software-service.de
 
Back
Top