Page Skipped during printing

hon33y

New member
Joined
Feb 7, 2008
Messages
1
Programming Experience
1-3
Hi All,

I am working in VB.Net 2003 under windows application i am having a printing code with custom paper defined in "Server properties". I defined 'A4 Half' with following dimension

width = 8.27in

height = 5.85in



the problem is when i print any record (Note: one record can contain multiple record) the first record print fine on half of A4 page and skip the page and continues printing on next page. My requirement is i want to print 2 record per A4 page.

I am using EPSON LQ-300+ dot matrix printer.


my printing code look like
VB.NET:
  Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click
        Dim clsGolfPOS As New GolfPOS(Application.StartupPath)
        Dim dtResult As DataTable
        Dim dstInvoice As DataSet
        Dim ObjFrmReport As FrmReport
        Dim ObjCrtlGolfPOSInvoice As CrptGolfPOSInvoice
        Dim dstGolfPos As New dstGolfPOS
        Dim pdoc As New PrintDocument

        dtResult = clsGolfPOS.GetPayingMembers(Me.intGolfPOSID).dstResult.Tables(0)

        For i As Integer = 0 To dtResult.Rows.Count - 1
            ObjFrmReport = New FrmReport
            ObjCrtlGolfPOSInvoice = New CrptGolfPOSInvoice
            dstInvoice = clsGolfPOS.GetGolfPOSInvoice(Me.intGolfPOSID, CInt(dtResult.Rows(i)("PaidBy"))).dstResult

            ObjCrtlGolfPOSInvoice.SetDataSource(dstInvoice.Tables(0))
            If i = dtResult.Rows.Count - 1 Then
            Else
                ObjCrtlGolfPOSInvoice.Section10.SectionFormat.EnableSuppress = True
            End If
            ObjFrmReport.CRViewer.ReportSource = ObjCrtlGolfPOSInvoice
            Try
                ObjCrtlGolfPOSInvoice.PrintToPrinter(1, False, 1, ObjFrmReport.CRViewer.ViewCount)
            Catch ex As Exception
                MessageBox.Show(ex.Message)
            End Try
        Next

        clsGolfPOS.UpdateStatusToPrinted(Me.intGolfPOSID)
    End Sub
 
Last edited by a moderator:
Back
Top