lines in report

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
 
E

Emilia Maxim

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top