Ticket T817498
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

ASPxDocumentViewer - Print Report button does not work after Google Chrome Update 76.0.3809.132

Xtrareport - Print Report button does not work after Google Chrome Update 76.0.3809.132

created 5 years ago

Hi team,
After the Google Chrome update 76.0.3809.132, the Print Report button of every of our Web Sites are no longer working. We have same problem with below ticket but we are using Xtrareport and reportviewer. Below solution is for documentviewer but we using reportviewer.
https://www.devexpress.com/Support/Center/Question/Details/T814122/aspxdocumentviewer-print-report-button-does-not-work-after-google-chrome-update-76-0
Kindly guide us to fix this. Thank you.

Answers approved by DevExpress Support

created 5 years ago (modified 5 years ago)

Hello,
To resolve this issue with the ReportViewer control, use a workaround provided by Yong Xiang Tay in the ASPxDocumentViewer - Print Report button does not work after Google Chrome Update 76.0.3809.132 ticket. That is, handle the client-side ReportViewer.PageLoad event as follows:

JavaScript
function init(s) { var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor); var createFrameElement = s.printHelper.createFrameElement; s.printHelper.createFrameElement = function (name) { var frameElement = createFrameElement.call(this, name); if(isChrome) { frameElement.addEventListener("load", function (e) { if (frameElement.contentDocument.contentType !== "text/html") frameElement.contentWindow.print(); }); } return frameElement; } }
ASPx
<dx:ReportViewer ID="RepViewer" runat="server" PageByPage="True"> <ClientSideEvents PageLoad="init"/> </dx:ReportViewer>
    Comments (2)

      Dear team,

      Thank you for the fast reply.

      DevExpress Support Team 5 years ago

        You're always welcome.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.