locked
Print Button not showing in SSRS Report in Chrome Browser RRS feed

  • Question

  • User-797751191 posted

    Hi

       I have Sql 2014 Advanced Express Edition. I have created report using Business Intelligence -> Report Server Project.  When i run report it does not show Print Button

    Problem is print button is not showing in chrome browser, but it is showing in IE browser

    Thanks

    Thursday, February 20, 2020 6:08 AM

All replies

  • 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:

    1. Set the ShowExportControls property to be true which you can refer to Use the WebForms ReportViewer Control;
    2. 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

    Friday, February 21, 2020 2:36 AM