Print report without preview
The reports are in server mode .rdl format and are rendered via Web report viewer. The user needs to be able to print to default printer without preview and print dialog box prompted. Is this possible?
March 4th, 2010 12:30am
Hi awu255,By default, SQL Server Reporting Services uses RSClientPrint to print report. The RSClientPrint is an ActiveX control and is not abled to progrmmed. To print a report without previewing, I would suggest you implementing custom application to do so:1. Use the “Render” method from SQL Server Reporting Service web service to render the report to an EMF file. 2. Use the PrintDocument .NET object to print the image file using a specified printer in specified size.
By the way, if you have installed SQL Server Reporting Services product sample, you will find a print sample at the following location by default. We can use the sample code in our custom application:C:\Program Files\Microsoft SQL Server\100\Samples\Reporting Services\Extension Samples\PrinterDelivery SampleFor more information, please see:PrintDocument Class: http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspxPlease feel free to ask, if you have any more questions.Thanks,Jin ChenJin Chen - MSFT
Free Windows Admin Tool Kit Click here and download it now
March 5th, 2010 4:49am
Thank you. This was really helpful. I almost get it to work. I can now print when I set the website anonymous user identity to Administrator but if I switch it back to IUSR then it doesn't print. No error, just nothing comes out of my printer. Where do I need to set permission for IUSR to print?
March 6th, 2010 7:39pm
Hi awu255,Since Anonymous user does not have permssions to render a report, the printing will fail.To solve the issue, we need to add the IUSR to report server using Report Manager.For more information, please see:http://msdn.microsoft.com/en-us/library/ms156014(SQL.90).aspxThanks,Jin ChenJin Chen - MSFT
Free Windows Admin Tool Kit Click here and download it now
March 10th, 2010 2:00am
I have given IUsr administrator right and still can't print. I have also created a windows user, make the user server administrator, report administrator and still I can't print. I have a user that I created since the server was built, that belongs to server administrators group and user that user, I can print. Any ideas?
March 10th, 2010 9:14pm
Jin Chen,
I'm also looking for a way to print without going into print preview using server side reports (using rdl reports and not rdlc). I have VS 2008 sp1 and sql server 2008; and VS 2010 and sql server 2008 R2 installed, but no directory located at:
C:\Program Files\Microsoft SQL Server\100\Samples\Reporting Services\Extension Samples\
only:
C:\Program Files\Microsoft SQL Server\100\Samples\Reporting Services\Model Samples
and
C:\Program Files\Microsoft SQL Server\100\Samples\Reporting Services\Report Samples
and neither of these contains the sample you are referring to. Can you please advise me on this as this issue is a show-stopper for our project if we don’t resolve it.
Thanks.
Free Windows Admin Tool Kit Click here and download it now
June 1st, 2010 12:25pm
Hi and for Crystal Report in VS 2008 C# Follow this link..http://codingresolved.com/discussion/18/print-report-without-preview-/p1
August 5th, 2012 12:38pm