Loines showing behind alternate sub reports

suepowell

Registered User.
Local time
Today, 02:43
Joined
Mar 25, 2003
Messages
282
HI,

I have a report with expanding text boxes, so I have used the me.line method within the on print event to draw the lines between the columns. This works fine.

I have a subreport that sits under each record and I don't want the lines to continue accross this subreport as the field spacing is different.

My confusion is that the lines are missing on records 1,3,5,7 etc, and there on records 2,4,6,8 etc.

I am using the on format event of the main report to change the detail background colour according to a criteria, and then to put alternate shades in. Again this works fine.

The subreport sets it's detail backgroung colour to be the same as the main report colour.

Can anyone suggest a reason for the strange behaviour of the lines?

I'll put the code below to see if that jogs any memories.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Static intTimesCalled As Integer
If intTimesCalled Mod 2 = 0 Then
If IsNull(Me.DUE_DATE) Then
Me.Detail.BackColor = 16777215
Else
If Me.DUE_DATE < Date Then
Me.Detail.BackColor = 332542
Else
If Me.DUE_DATE > Date + 7 Then
Me.Detail.BackColor = 5687650
Else
Me.Detail.BackColor = 4501753
End If
End If
End If

Else
If IsNull(Me.DUE_DATE) Then
Me.Detail.BackColor = 14869218
Else
If Me.DUE_DATE < Date Then
Me.Detail.BackColor = 8291070
Else
If Me.DUE_DATE > Date + 7 Then
Me.Detail.BackColor = 11855801
Else
Me.Detail.BackColor = 11788285
End If
End If
End If

End If
intTimesCalled = intTimesCalled + 1

End Sub


Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Me.ScaleMode = 1
Me.DrawWidth = 10
Me.Line (0.001, 0)-(0.001, 14400)
Me.Line (1.6 * 567, 0)-(1.6 * 567, 14400)
Me.Line (6.8 * 567, 0)-(6.8 * 567, 14400)
Me.Line (10# * 567, 0)-(10# * 567, 14400)
Me.Line (11.4 * 567, 0)-(11.4 * 567, 14400)
Me.Line (12.8 * 567, 0)-(12.8 * 567, 14400)
Me.Line (14.3 * 567, 0)-(14.3 * 567, 14400)
Me.Line (16.4 * 567, 0)-(16.4 * 567, 14400)
Me.Line (18.2 * 567, 0)-(18.2 * 567, 14400)
Me.Line (20.3 * 567, 0)-(20.3 * 567, 14400)
Me.Line (22# * 567, 0)-(22# * 567, 14400)
Me.Line (24.1 * 567, 0)-(24.1 * 567, 14400)
Me.Line (27.2 * 567, 0)-(27.2 * 567, 14400)
End Sub


Thanks

Sue
 

Users who are viewing this thread

Back
Top Bottom