run time set printer name to print in crystal report
PRINTER NAME TO PRINT RUN TIME IN CRYSTAL REPORT VB.NET WINDOWS FORM
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Manoj KumarPosted May 16, 2018, 8:51 AM
Dim ds As New DataSet
sel = "SELECT * FROM BRSMS.KOT_MASTER WHERE KOT_NO = '" + txtKotNo.Text + "'"
OraDap = New OracleDataAdapter(sel, Oracon)
OraDap.Fill(ds, "KOT_MASTER")
sel = "SELECT * FROM BRSMS.KOT_DETAILS WHERE STATUS='N' AND KOT_NO = '" + txtKotNo.Text + "'"
OraDap = New OracleDataAdapter(sel, Oracon)
OraDap.Fill(ds, "KOT_DETAILS")
Dim VP1 As New rptKotPrint
VP1.SetDataSource(ds)
'frmReport.CrystalReportViewer1.ReportSource = VP1
'frmReport.ShowDialog()
VP1.PrintOptions.PrinterName = "hp LaserJet 1010 HB"
Report = VP1
Report.PrintToPrinter(1, False, 0, 0)
Uttam ChaturvediPosted May 16, 2018, 8:12 AM
Manoj KumarPosted May 16, 2018, 7:31 AM
Nilesh PatilPosted May 15, 2018, 8:16 AM