How will my application know from which printer to print??

Posted by Laghaterohan under Regular Expressions on 11/27/2010 | Points: 10 | Views : 1455 | Status : [Member] | Replies : 2
Hello,

As per all my previous post , i am using PrintToPrinter() method to directly print my crystal report without showing its preview..

When i am accessing my application via link (http://blahblah/mypage.aspx) at that point when i click on my print button it gives me error : NO PRINTERS INSTALLED !

However i have printer installed on my local machine.....how can i overcome this issue????

Please help me out....its urgent


Thanks!!

Best Regards,
Rohan Laghate



Responses

Posted by: SheoNarayan on: 11/27/2010 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
No clues however if printer is installed on your local machine you should have got the list of installed printer in the Print dialogue box, are you seeing any printer installed in the Print dialogue box?

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Laghaterohan on: 11/28/2010 [Member] Starter | Points: 25

Up
0
Down
Hi,

Well, here there is a catch...You also need printer installed on your server for PrintToPrinter() method to work. You can refer to article related to this at asp alliance site. However, the problem does not end here. We need to mention the printer name like :
dmyReport.PrintOptions.PrinterName = 'MYPrinter'
so that it detects the printer and prints.

However each time this wont be possible. So, in order to know which printers are installed on your Server use:

dropdownlistname.DataSource = System.Drawing.Printing.PrinterSettings.InstalledPrinters;  


I get my ddl populated from my local machine with the avlb printers.. However when i deploy my application on the Server i do not get my printers...as as per the asp alliance site we need to do mapping of the System user with the Printer.....ANY IDEA HOW TO DO THIS???

PLEASE HELP HELP...


THANKS!!



Best Regards,
Rohan Laghate

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response