I would like to know if someone can send me a sample code on how to print a local report without previewing the data on the screen? This is a web application using .NET 2.0 and sql 2000. The client doesn't want to display the data, but send the report right to the default printer. The printer name can't be hard coded on the web.config file. The application needs to be able to read what is the default printer of the user and use that printer.
I am 99.99% sure that you cannot print directly from a web application. Here is a solution for windows application. See if you can make it to work.
http://msdn2.microsoft.com/en-us/library/ms252091(VS.80).aspx
|||I have seen this solution. However, the solution needs to have the printer name already defined on the code. I am not very clear if .NET has a library that I can use to identify the users default printer at runtime. Do you know of a library name that I can use?
|||Well as per my exprerinece with local reports you can not print it as you will not get print button on viewer. You will have to export it into Excel/PDF format and then you can take the print of it.
No comments:
Post a Comment