21-06-18, 02:57 AM
اخوانى برجاء المساعدة فى طباعة بون كاشير بعد عدد من البونات يظهر بون فارغ من البيانات
كود :
Public Sub MyPrint()
On Error Resume Next
REM ///////////////////////////// //////////////////////////////////
CRV1.ReportSource = New CryBill
Dim Da As SqlCommand = New SqlCommand("SELECT * FROM View_Bill where Bil2_Shift=" & Val(txtShift.Text) & " And Bil2_No=" & Val(txtNo.Text) & "", Conn)
AdView = New SqlDataAdapter(Da)
Dim Bu As SqlCommandBuilder = New SqlCommandBuilder(AdView)
'--------------------------------------------------------------------
Conn.Open()
DsView.Clear()
AdView.Fill(DsView, "View_Bill")
Conn.Close()
'===================================================================
Dim rpt As New CryBill
rpt.SetDataSource(DsView)
Me.CRV1.ReportSource = rpt
Me.CRV1.RefreshReport()
rpt.PrintToPrinter(1, False, 0, 0)
rpt.Close()
rpt.Dispose()
End Sub