Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27154

VS 2010 Increasing Pages in PrintDocument

$
0
0
Hi I am using vb.net with farpoint .net, I want to print 500 records on PrintDocument1, this coding works fine for the 1st page but it does not automatically generate 2nd page, 3rd page etc. there are 500 records that i want to print. please let me know how to increase pages. Thanks .. Ladak


Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage

e.Graphics.DrawString(txtFixedID.Text, txtFixedID.Font, Brushes.Blue, 100, 100)
e.Graphics.DrawString(txtFixedID.Text, txtFixedID.Font, Brushes.Blue, 500, 100)

Dim Msg1 As String
Dim YValue As Double

YValue = 150

For A1 = 0 To Fp1.Sheets(0).RowCount - 1


Msg1 = Fp1.Sheets(0).GetText(A1, 1)

e.Graphics.DrawString(Msg1, txtFixedID.Font, Brushes.Black, 100, YValue)


Next A1

End Sub

Viewing all articles
Browse latest Browse all 27154

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>