User-719153870 posted
Hi jsshivalik,
Problem is print button is not showing in chrome browser, but it is showing in IE browser
The print button is actually an ActiveX control, this means it will only work for IE, it will not show in Chrome, Mozilla or in Safari.
To solve the problem, below are two solutions you can try:
- Set the
ShowExportControls
property to be true which you can refer to
Use the WebForms ReportViewer Control; - Use below code to create a custom print button:
//call printdiv() function on button click
<input name="b_print" type="button" onclick="printdiv();" value=" Print Report" />
//function for print
function printdiv() {
//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();
return false;
}
Above solutions are from How to show Print button in Report viewer in Firefox and Crome.
Best Regard,
Yang Shen