Click here to Skip to main content
15,903,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to avoid print preview which is showing when we generate report. After clicked on a button directly print come from printer.
Any solution on this,because we know paper size so instead of seeing print preview every time print must be access from printer.so that user did not need to check print preview every time.

I am using Microsoft report viewer for windows form.
Posted
Updated 19-Dec-12 0:03am
v2
Comments
chester_it21 19-Dec-12 5:51am    
Hi Tejas11C, what application your craete..??
Web...?..windows..??
Have try using reportviewer...
Tejas11C 19-Dec-12 6:03am    
I am using Microsoft report viewer for windows form.
CHill60 19-Dec-12 5:56am    
Use the improve question gadget to post the code that is causing the problem
Tejas11C 19-Dec-12 6:06am    
friend when we generate report at that time you see report with functionality like print preview but i don't want print preview i want directly print from printer
chester_it21 19-Dec-12 6:20am    
Do you have try using printdialog...

The following referencee should help ...
Quote:
Walkthrough: Printing a Local Report without Preview

http://msdn.microsoft.com/en-us/library/ms252091.aspx[^]
 
Share this answer
 
use this line
C#
 //orpt is cobject of ReportDocument
...
orpt.PrintToPrinter(1, False, 0, 0);

Happy Coding!
:)
 
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