Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Code for adding HTML content to report viwer
- var headstr = "<html><head><title></title></head><body>";
- //End of body tag
- var footstr = "</body></html>";
- //This the main content to get the all the html content inside the report viewer control
- //"ReportViewer1_ctl10" is the main div inside the report viewer
- //controls who helds all the tables and divs where our report contents or data is available
- var newstr = $("#ReportViewer1_ctl10").html();
- //open blank html for printing
- var popupWin = window.open('', '_blank');
- //paste data of printing in blank html page
- popupWin.document.write(headstr + newstr + footstr);
- //print the page and see is what you see is what you get
- popupWin.print();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement