Advertisement
Guest User

Untitled

a guest
May 27th, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. //Code for adding HTML content to report viwer
  2. var headstr = "<html><head><title></title></head><body>";
  3. //End of body tag
  4. var footstr = "</body></html>";
  5. //This the main content to get the all the html content inside the report viewer control
  6. //"ReportViewer1_ctl10" is the main div inside the report viewer
  7. //controls who helds all the tables and divs where our report contents or data is available
  8. var newstr = $("#ReportViewer1_ctl10").html();
  9. //open blank html for printing
  10. var popupWin = window.open('', '_blank');
  11. //paste data of printing in blank html page
  12. popupWin.document.write(headstr + newstr + footstr);
  13. //print the page and see is what you see is what you get
  14. popupWin.print();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement