I am using PrintToPrinter to print crystal report with page range,
It is working fine in my local computer bycause there is printer installed.
But when i am deploying that code on server than it is giving a message that Printer is not installed because there is no installed printer on server.
But i want to print through clients system I mean i want client side printing in crystal report so it will use client's printer not server printer.
Than What should i suppose to do.
Any suggestions will be highly appreciable.
Dim rpdt As New ReportDocument
Dim query As String = "select * from V_INV_GETINVOICERPTPRINT1 where invoiceid='" + ddlInvoiceNo.SelectedValue + "'"
Dim dsLoad As New DataSet
dsLoad = objService.Exec_Dataset1(query)
Dim InvoiceType As String = element
dsLoad.Tables(0).Rows(0)("COPY") = InvoiceType
CrystalReportViewer1.ReportSource = rpdt
CrystalReportViewer1.Visible = True
rpdt.PrintOptions.PrinterName = GetDefaultPrinter()
rpdt.PrintToPrinter(1, False, 1, 1)
Private Function GetDefaultPrinter() As String
Dim settings As PrinterSettings = New PrinterSettings()
For Each printer As String In PrinterSettings.InstalledPrinters
settings.PrinterName = printer
If settings.IsDefaultPrinter Then
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)