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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Nilesh PatilRank #1,129 · 1.6K reputationPosted May 15, 2018, 4:16 AM EDT
Uttam ChaturvediRank #477 · 5.2K reputationPosted May 16, 2018, 4:12 AM EDT
Manoj Kumar22 reputationPosted May 16, 2018, 4:51 AM EDT
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)
Manoj Kumar22 reputationPosted May 16, 2018, 3:31 AM EDT