Click here to Skip to main content
15,942,094 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
How can I print report directly to the printer, instead of viewing it on screen?

Thanks / Furqan
Posted

first you have to create a new form for example (frmReportViewer)
then drag the reportviewer in to this form
then select your report file as reportsurce to create a temp
afte that ---> frmReportViewer.ReportFileName.PrintToPrinter(1, True, 0, 0)
 
Share this answer
 
Comments
Furqan Sehgal 27-Feb-11 13:04pm    
I tried to give my reportfile's name but it does not accept it. My report file name is rptTest
I tried Form1.rptTest.PrintToPrinter(1,True,0,0)
But it says rptTest is not the member of From1

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