I use Crystal Reports to print KOT printer orders. I have four different KOT printers. Items are printed according to the assigned printer names.
This works great, but I checked the No Printer option to increase print speed. Then prints are sent to only one printer. When it is not installed, the problem is solved.
code:
strSQL = ""
Dim crptDV As New ReportDocument()
Dim da As New SqlDataAdapter(strSQL, gblCon)
Dim ds As New DataSet
da.Fill(ds)
Dim path As String
path = Application.StartupPath
crptDV.Load(path & "\reports\rptItemOrder.rpt")
crptDV.SetDataSource(ds.Tables(0))
Dim parameter As New ParameterField
parameter = crptDV.ParameterFields("CompanyName")
parameter.CurrentValues.AddValue(CompName)
crptDV.PrintOptions.PrinterName = PrinterName
crptDV.Close()
crptDV.Dispose()
source
share