We are converting some reports from Crystal Reports to Microsoft SQL Reporting Services (SSRS) in an ASP 2.0 VB.Net web app. Crystal had a function called PrintToPrinter which was being used to programmatically print to a network printer that we specified in the code as soon as the user clicked a button on the screen. The printer dialog box did not appear. It was true one-click printing.
I need to figure out how to do the same thing in SSRS. Right now we have our SSRS reports rendering to a PDF and opening in a new window when the user clicks the button, forcing the user to then click another print button on that screen to print the report.
I've been looking all over the web for how to do this but am not finding much luck.
Supposedly there is a way to call an SSRS web service, render the report as an EMF, and use things like System.Drawing.Imaging and System.Drawing.Printing to send the report to the printer. I can't find any detailed examples of how to do this in VB.Net code however. I'm trying to avoid doing this from scratch because I have very little time left to complete this. Posts about this all seem to be from 2004 so I'm not sure if something better has come along since then. This link shows an example of this in C# but since I don't know C# I can hardly make head or tail of it:
http://blogs.msdn.com/bryanke/articles/71491.aspx
I also read some suggestions that there might be a way to use an RSPrintClient ActiveX control that's new in SSRS 2005 but I can't find any examples and it sounds like they may still pop up the print dialog box. I was thinking of using JavaScript to fire a window.print and then close the window that's showing the PDF, but I think this would still force the user to click the print dialog box, plus it would flsh onto their screen and be less invisible of a process.
In addition, I read you might be able to use Windows Script Host to print programmatically on the client, but again I'm unfamiliar with it and I don't think there are any examples integrating that with SSRS out there.
Finally I found an example that I believe was saving the PDF to disk and sending some kind of function calls to Adobe to make Adobe print it in the background. I put the code in my app but it just didn't work.
Anyway, you can see I've looked everywhere and am not finding what I need. If anyone has any working examples of VB.Net web app code that makes it possible to do automatic, programmatic printing of SSRS reports to a network printer, please post it, send it to me, or direct me to where I can find it.
Thank you!