Dim Obstectric_History As String
Obstectric_History = dr.Item(6)
Dim words() As String = Obstectric_History.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)
Dim lineList As List(Of String) = New List(Of String)
Dim line As String = ""
For Each word As String In words
If (line.Length + word.Length + 1) < 10 Then
line = line & " " & word
Else
If (yang11 >= 300) Then
e.HasMorePages = True
yang11 = 270
Else
e.HasMorePages = False
End If
e.Graphics.DrawString(line, ft1, Brushes.Black, 125, yang11)
yang11 = yang11 + 20
lineList.Add(line)
line = word
End If
Next
facing problem with e.hasmorepages.
Page 1 of 12 Replies - 587 Views - Last Post: 24 April 2012 - 10:56 AM
#1
facing problem with e.hasmorepages.
Posted 24 April 2012 - 04:54 AM
When i am using e.hasmorepages in the following code it is giving a single page print with overlapped. i mean it is overlapping the contents of other pages in 1st page. please tell me wat to do?
Replies To: facing problem with e.hasmorepages.
#2
Re: facing problem with e.hasmorepages.
Posted 24 April 2012 - 06:57 AM
Try remarking out the
lines
What I THINK might be happening is that it is hitting that line even though you have more lines but that is telling the printpage that it is the last page and then you're continuing to draw.
I admit I struggle with the logic of the HasMorePages method but what I do know is, when e.HasMorePages=True, the printpages is ran from the beginning so any intialization of variables are reinitialized.
Else e.HasMorePages = False
lines
What I THINK might be happening is that it is hitting that line even though you have more lines but that is telling the printpage that it is the last page and then you're continuing to draw.
I admit I struggle with the logic of the HasMorePages method but what I do know is, when e.HasMorePages=True, the printpages is ran from the beginning so any intialization of variables are reinitialized.
#3
Re: facing problem with e.hasmorepages.
Posted 24 April 2012 - 10:56 AM
its not working.......
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|