Ticket T820506
Visible to All Users

A java script error when printing a report from the ASPxDocumentViewer control in Chrome v77

created 5 years ago (modified 5 years ago)

[DevExpress Support Team: CLONED FROM T814122: ASPxDocumentViewer - Print Report button does not work after Google Chrome Update 76.0.3809.132]

Hi,
We installed the hotfix 18.2.11 but when we click the printbutton, it throws an Error in Chrome: Cannot read property 'contentType' of null
The error occurs on: if(f.contentDocument.contentType !== "text/html")
We use the DocumentViewer Extension

Screenshot is attached
is there any solution?

Comments (3)
DevExpress Support Team 5 years ago

    Hello,
    My attempt to reproduce this behavior was not successful. In the attachment, you will find a sample video illustrating that everything works fine on my side. Please provide me with a sample project that demonstrates the problematic behavior. I look forward to hearing from you.

      Thanks for the feedback.
      Unfortunately our Documentviewer is not so easy to set off from the main project.
      But i try.
      I noticed that your script is executed 3 times.
      The third time the contentType is null and the Script crashes.

      I have attached our DocumentViewer cshtml code .

      DevExpress Support Team 5 years ago

        Hello,
        I cannot determine why the workaround doesn't work only by reviewing your view. I have attached the sample project that I used in the video from my previous comment. Please modify the project so I can reproduce the issue on my side.

        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.