Click here to Skip to main content
15,889,843 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
I used crystal report 13 in visual studio 2012 for my asp.net project. My problem is that, when I click on my print button in crystal report page, it shows a display Print to PDF with Export button. But I don't want any export button.

I need to print my report direct with one screen of microsoft xps document writer.

I just simply use the following code for my print report:
C#
ReportDocument CustomerReport = new ReportDocument();
CustomerReport.Load(Server.MapPath("crCustomer.rpt"));
CustomerReport.SetDataSource(ds.Tables["tblCustomer"]);
CrystalReportViewer1.ReportSource = CustomerReport;
CrystalReportViewer1.DataBind();


Is there any code missing behind those code or any other way to print report direct with microsoft xps document writer?
Posted
Comments
Herman<T>.Instance 18-Sep-14 17:48pm    
set the xps printer as default printer
Member 8454009 19-Sep-14 6:35am    
But I found there only two option ActiveX and pdf. I couldn't found where to set xps printer.

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