Click here to Skip to main content
15,881,715 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello,

i have made an asp.net website that prints the receipt. Every thing works well in VS Dev Environment. When i published the website and run on client machine, printing is'int working. the printer does'nt even takes the print call from my website. here is my code

printername = pd.PrinterSettings.DefaultPageSettings.PrinterSettings.PrinterName;
rd.PrintOptions.PrinterName = printername;
rd.SetDataSource(dsPur);
rd.PrintToPrinter(1, false, 0, 0);

Thanks in Advance,
Posted
Comments
senguptaamlan 20-Sep-10 6:27am    
attach a printer to the webserver...the printing will be done :)

Try this post Crystal Report Direct Print[^] It will help you.
 
Share this answer
 
Comments
Sandeep Mewara 20-Sep-10 11:22am    
Comment from OP: Thanks alot, your link does the trick
You cannot control the client's printer from code running on the webserver. You have to create print specific elements on the webpage (or simply a popup that shows the receipt) and call the print from javascript to print the page. Your develop machine is the both client and server so it looks to you it's working but if both are running separately it's it doesn't work and have to think in client/server concepts.

Good luck!
 
Share this answer
 
Comments
sola oderinde 21-Sep-10 8:18am    
Thanks for the answer Nijboer, Not exactly, what I wanted, but it sure did help.
Actually I found out that I could append a COLLATE clause to my search text and make my database perform a diacritic-insensitive search.

All I needed to do was append the clause 'COLLATE_Latin1_General_CI_AI'

Please, note that this may not always work, depending on how the database in accessed.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900