I am using ReportViewer in ASP.net 2.0. It was a local Report and bind data from Dataset. It was workd well . But , My problem was, when i need to go print , i cann't do it. I searched google and found solution using Javascript.
Get Html code by using document.getElementbyID(controlname).innerHTML().
Write that code to New window. And then print page by using window.print() function.
But , the problem is it only prints first page, Not all pages. If my report goes to more than one page, Print first page only. Can you help me please?.
(OR)
How to print report in reportviewer. It should be worked in IIS or client machine.
If you want to get high quality and a controlled printing output, then forget about getting the HTML code from the report to print it. You should export the report to PDF and let the user to print it. Printing in ReportViewer is limited to IE as it uses
ActiveX but you could try this code to add a custom print button that works cross-browser.
Barcode, Labeling, Printing & Imaging tools for ASP.NET Developers
Member
457 Points
250 Posts
Print All Pages of Reportviewer using ASP.net
May 15, 2013 08:12 AM|Tamizhiniyan Natarajan|LINK
Hi all,
I am using ReportViewer in ASP.net 2.0. It was a local Report and bind data from Dataset. It was workd well . But , My problem was, when i need to go print , i cann't do it. I searched google and found solution using Javascript.
Get Html code by using document.getElementbyID(controlname).innerHTML().
Write that code to New window. And then print page by using window.print() function.
But , the problem is it only prints first page, Not all pages. If my report goes to more than one page, Print first page only. Can you help me please?.
(OR)
How to print report in reportviewer. It should be worked in IIS or client machine.
Thanks in advance...
Participant
1130 Points
349 Posts
Re: Print All Pages of Reportviewer using ASP.net
Jun 05, 2013 12:05 PM|sridhar_rs|LINK
Have you tried this?
http://stackoverflow.com/questions/3504747/how-to-call-print-from-asp-net-on-a-reportviewer-control
Thank you very much,
Please if my reply helped you.
Participant
1170 Points
367 Posts
Re: Print All Pages of Reportviewer using ASP.net
Jun 05, 2013 02:37 PM|Neodynamic|LINK
If you want to get high quality and a controlled printing output, then forget about getting the HTML code from the report to print it. You should export the report to PDF and let the user to print it. Printing in ReportViewer is limited to IE as it uses ActiveX but you could try this code to add a custom print button that works cross-browser.
Member
457 Points
250 Posts
Re: Print All Pages of Reportviewer using ASP.net
Jun 25, 2013 01:46 AM|Tamizhiniyan Natarajan|LINK
Thanks sridhar_rs.
I found this code and worked well. But, Its only worked in IE.What ll i need to do for cross browser printing?
Member
457 Points
250 Posts
Re: Print All Pages of Reportviewer using ASP.net
Jun 25, 2013 02:01 AM|Tamizhiniyan Natarajan|LINK
Is it a free dll ? or Trial Basis?