Graphics.Hasmorepages
Please tell me, while following code just print only the first page while it have more one.
Dim LineofLsv As Integer = 0
e.HasMorePages = False
LineofLsv = LsvPrint.Items.Count - 1
For i = 0 To LineofLsv
CurYP = CurYP + 63 '63
CurXP = 575
For k = 1 To Len(tmpcomTaxid)
AnyString(e.Graphics, CStr(Mid(tmpcomTaxid, k, 1)), CurXP, CurYP)
CurXP = CurXP + 12
Next k
CurYP = CurYP + 25 '88
AnyString(e.Graphics, TmpCompanyName, 63, CurYP)
CurYP = CurYP + 25 '113
AnyString(e.Graphics, TmpcompanyAdd, 63, CurYP)
CurYP = CurYP + 143 '256
Dim TmpTax As String = ""
TmpTax = CStr(LsvPrint.Items(i).SubItems(3).Text)
CurXP = 575
For j = 1 To Len(TmpTax)
AnyString(e.Graphics, CStr(Mid(TmpTax, j, 1)), CurXP, CurYP)
CurXP = CurXP + 12
Next j
CurYP = CurYP + 25 '281
AnyString(e.Graphics, CStr(LsvPrint.Items(i).SubItems(1).Text) & " " & CStr(LsvPrint.Items(i).SubItems(2).Text), 63, CurYP)
CurYP = CurYP + 38 '319
AnyString(e.Graphics, CStr(LsvPrint.Items(i).SubItems(4).Text), 63, CurYP)
IntUnitP = CDbl(LsvPrint.Items(i).SubItems(7).Text)
IntTaxU = CDbl(LsvPrint.Items(i).SubItems(8).Text)
CurYP = CurYP + 419 '738
AnyString(e.Graphics, Dp1.Value.ToString("d MMM yy"), 456, CurYP)
AnyString(e.Graphics, IntUnitP.ToString("#,##0.00"), 563, CurYP)
AnyString(e.Graphics, IntTaxU.ToString("#,##0.00"), 694, CurYP)
CurYP = CurYP + 118 '807
AnyString(e.Graphics, IntUnitP.ToString("#,##0.00"), 563, CurYP)
AnyString(e.Graphics, IntTaxU.ToString("#,##0.00"), 694, CurYP)
CurYP = CurYP + 24 '831
ThaiText(IntTaxU)
AnyString(e.Graphics, "(" & Stmp & ")", 231, CurYP)
CurYP = CurYP + 182 '1013
AnyString(e.Graphics, Dp1.Value.ToString("d MMM yy"), 375, CurYP)
If i = LineofLsv Then
e.HasMorePages = False
Else
e.HasMorePages = True
End If
Next i
|