I have written the following code as,
Dim report As New ReportDocument
report.PrintOptions.PrinterName = "\\network\printer"
report.Load(CrystalReportName.rpt, OpenReportMethod.OpenReportByDefault)
report.PrintToPrinter(1, False, 0, 0)
when i am trying to run this code , it shows the error message as “Invalid Printer Specified”. If i give the local printer name, it is working fine. But i can’t able to print the crystal report directly to the network printer. Kind help needed. Thanks in advance.
Sivakumar.P
May be the printer name is wrong.
Please use the following code to debug what name is coming while choosing the network printer
http://www.codeproject.com/KB/printing/printtoprinter.aspx
and then assign proper name.
Still if incase it did not work out, there might be a permission issue then look at
http://forums.asp.net/t/1383129.aspx
Best of luck,.