Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Printing issue when the "No Printer" option is selected

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()
like image 325
sarath Avatar asked Aug 16 '17 04:08

sarath


1 Answers

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.

like image 150
Tridam Avatar answered Oct 15 '22 01:10

Tridam