views:

171

answers:

1

Hello,

From my vb.net code I am trying to set a printer name for the crystal reports printing

rpt.PrintOptions.PrinterName="\johnKing\HP LaserJet 2200 Series PCL"

But when I go to windows-->Start--> Run and enter \JohnKing

It is showing me Printers and Faxes folder and Scheduled task folder. But when I open Printers and Faxes it will show the adderess as Printers and Faxes on JohnKing.

From my web application I want to sent the Printer name is the name shown above.

Please help

A: 

I don't believe you can access a network printer this way. I think you need to add the device locally first.

  • Share the printer on the system with the printer installed
  • Connect to the share on the system running your application
  • User the local printer name in PrinterOptions.PrinterName

You could probably connect and install the printer programatically if need.

I get the impression that you want to print to a local printer from the web application. You might be able to do this with ActiveX or something, but to my knowledge, the printer needs to be installed on the web server.

Douglas Anderson