Last post May 13, 2011 04:32 AM by erashu
Jan 06, 2011 08:40 AM|vishwaraj1|LINK
I am working on a project and I am creating crystal reports.
I have to print the reports.
When I press the print icon on the report , 1 pop opens and it asks me to choose all pages or select page range when I press on "Ok" on this page it then opens the repost in pdf file and then I click on print button on pdf and then print comes.
I want that when User click on report then without any further popup the Print should come and if it is not possible then after 1st popup print shud come. I dont want that User shud see the pdf file..
and I have not written any code for printing..
Can any body help me in this please...
Thanks in advance...
crysta report in 2008
Jan 06, 2011 10:41 AM|microsoftee|LINK
In ReportViewer control Change PrintMode from PDF to ActiveX
Jan 07, 2011 05:54 AM|vishwaraj1|LINK
Hi Thanks for ur reply....
I have tried by changing the ReportViewer control PrintMode from ActiveX and PDF but nothing works.
Do u have any other Idea how to solve this problem..
I have also tried by using this
reportDocument.PrintToPrinter(1, false, 1, 1);
but by using this print is not coming in proper format. Some unwanted information is showing on page...
Jan 07, 2011 10:28 AM|lickweed|LINK
try not to use the toolbar, instead create a button for print and export
Jan 10, 2011 08:57 AM|vishwaraj1|LINK
I am doing this on button click event..
protected void btnPrint_Click(object sender, EventArgs e)
DataBaseAccess dataBaseAccess = new DataBaseAccess();
ReportDocument report = new ReportDocument();
report.SetDatabaseLogon("sa", "sa", @"SYSTEM14\SQLEXPRESS", "HouseRental");
CrystalReportViewer1.ReportSource = report;
report.PrintToPrinter(1,false, 0, 0);
but when I press print button it opens a Microsoft office Onenote document and some Unwanted Information is also appearing on the printed page. It is also breaking the Report alignment.
Do u have any better code or Idea to do this.
May 13, 2011 04:32 AM|erashu|LINK