following is my code in my code behind:
protected void print_Click(object sender, EventArgs e)
{
try
{
oReport1.Load(Server.MapPath("~/Report/PaySalaryMonthWise.rpt"));
connection.DoCRLogin(oReport1);
CrystalReportViewer1.ReportSource = oReport1;
CrystalReportViewer1.DataBind();
oReport1.PrintToPrinter(1, false, 0, 0);
}
design code:
style="top: 6px; left: 758px; position: absolute; height: 26px; width: 62px" />
Ravi ShekharPosted Jul 18, 2013, 2:36 AM
I was wondering you are working in windows. but in asp.net ....
click on below link...
http://www.neodynamic.com/articles/How-to-Directly-Print-Crystal-Reports-to-Default-Client-Printer-from-ASP-NET-without-Preview-or-Printer-Dialog/
Ravi ShekharPosted Jul 18, 2013, 2:28 AM
no need to do programmatically...
first install your printer.
then start --> printer and faxes--> now right click on any printer (which you want) and -->
set default printr
mark it as answer if it helped
deepa ashwiPosted Jul 18, 2013, 2:21 AM
Ravi ShekharPosted Jul 18, 2013, 2:12 AM