Click here to Skip to main content
16,009,057 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i dont have printers installed in my client machines..so if i code to set default printers to client machine will that work?and how to code to set default printer



C#
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);



            }
Posted
Comments
[no name] 20-Jul-13 7:51am    
If there is no printer installed, how would you expect any printer code to work?
Sergey Alexandrovich Kryukov 20-Jul-13 22:17pm    
Makes no sense; please see the comment by ThePhantomUpvoter above. And you don't want to touch client's printers, it should remain at sole discretion of the owner of the client computer.
—SA

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