locked
Print All Pages of Reportviewer using ASP.net RRS feed

  • Question

  • User22205941 posted

    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...

    Wednesday, May 15, 2013 8:12 AM

Answers

All replies

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 5, 2013 12:05 PM
  • User-1185172246 posted

    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.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 5, 2013 2:37 PM
  • User22205941 posted

    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?

    Tuesday, June 25, 2013 1:46 AM
  • User22205941 posted

    Is it a free dll ? or Trial Basis?

    Tuesday, June 25, 2013 2:01 AM