I am using Crystal Reports for printing orders to a KOT printer. I have four different KOT printers. The items are printed according to the corresponding printer names assigned.
This works fine, but in order to increase the speed of printing I checked the "No printer" option. Then prints are coming to only one printer. When it is unchecked 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()
Crystal Report "No Printer" option
The 'No printer' option is when we need to view or print a Crystal Report in a web environment.
Checking the 'No Printer' option tells the report not to get associated with a particular printer and thus it picks up the settings from the report settings or the settings provided from the code.
If the No Printer is no cheked the report picks up the printer settings from the available printer from the developer machine and when it's send to a different printer it messes up the output sometime.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With