Could not print on Chrome 77

24 posts, 0 answers
  1. Dang Quang
    Dang Quang avatar
    4 posts
    Member since:
    May 2008

    Posted 12 Sep Link to this post

    This morning, after upgraded my Chrome to version 77, I found out that I could not print any Telerik reporting report.

    How to solve it?
  2. Gurbuz
    Gurbuz avatar
    4 posts
    Member since:
    Mar 2016

    Posted 12 Sep Link to this post

    Exactly, we have the same error.
  3. Steven
    Steven avatar
    2 posts
    Member since:
    May 2019

    Posted 12 Sep Link to this post

    Same here, we need either a fix or a workaround for this.
  4. Dang Quang
    Dang Quang avatar
    4 posts
    Member since:
    May 2008

    Posted 12 Sep Link to this post

    After a quick research, I have patched ReportViewer.js to make this function works again on Chrome 77.

    Find the line

    var url = client.formatDocumentUrl(info.clientId, info.instanceId, info.documentId, queryString);


    And insert the following code behind it:


    function getChromeVersion () {
    var raw = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./); return raw ? parseInt(raw[2], 10) : false;
    }
    if (getChromeVersion() >= 77) { var w = window.open(url);
    w.addEventListener('load', w.window.print, true);
    }

    Hope this helps
  5. Gurbuz
    Gurbuz avatar
    4 posts
    Member since:
    Mar 2016

    Posted 12 Sep in reply to Dang Quang Link to this post

    Thanks, bro, but it didn't. It prints the whole page this way. I just want to print the inside of Telerik Report Q1 2012. I open the web page where Reportviewer is located as follows.

    string script;
    script = "<script language='javascript' type='text/javascript'>";
    script += "var w = window.open ('ggg.aspx','_new4','height=900,width=900,left=130,top=20,scrollBars=yes,status=no,toolbar=no,menubar=no,resizable=no,close=no')</script>";
    ScriptManager.RegisterClientScriptBlock(Page, GetType(), "gsgs", script, false);

     

     

  6. Travis Cotton
    Travis Cotton avatar
    22 posts
    Member since:
    Sep 2009

    Posted 12 Sep Link to this post

    This is a critical issue.  Printing still works in Firefox but most of our user base is using Chrome.  Please advise.
  7. Neli
    Admin
    Neli avatar
    190 posts

    Posted 12 Sep Link to this post

    Hello,

    The issue is reproducible on our end. Although it is due to the browser's version, we will consider it as a bug. It's logged in our system with high priority, as well as in our public Feedback portal - Print Dialog doesn't appear in Google Chrome 77.0.3865.75. Feel free to vote for it.

    At this moment, you can use other browsers for the print functionality until the issue is fixed or we find a workaround.

     

    Regards,
    Neli
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  8. Lisa
    Lisa avatar
    11 posts
    Member since:
    Jul 2016

    Posted 12 Sep in reply to Neli Link to this post

    This is a major problem for us.  Chrome is our recommended browser and ALL of our customers use it.  Our tech support department continues to be swamped with calls.  We need a fix for this ASAP.
  9. Anthony
    Anthony avatar
    6 posts
    Member since:
    Feb 2013

    Posted 12 Sep Link to this post

    It has been hours since this CRITICAL bug has been reported.  Switching to another browser to print reports is absolutely ridiculous suggestion as a work around.  Is there any update / progress on this issue?????!!!
  10. Neli
    Admin
    Neli avatar
    190 posts

    Posted 13 Sep Link to this post

    Hello,

    We are sorry for the inconvenience this causes. I can make you sure that we are doing our best to include the fix for the issue in our new release on Wednesday (18th of September). Once it works, we will post an update in Print Dialog doesn't appear in Google Chrome 77.0.3865.75 and if you have voted for it, you will receive an email notification for that.

    Today we found a workaround. In general, the printing functionality is based on rendering the report in PDF format with special settings so when the PDF file opens in a browser, the PDF plug-in's Print dialog is directly invoked. By default, the viewer widget tries to use the PDF plug-in of the browser for printing. You can manually control the printing behavior through the printMode option when creating the report viewer widget.

    By setting FORCE_PDF_FILE printMode option, the widget will always export the report document to a PDF file with the special print script. For more information, check Printing Reports article. For example in the HTML5 Report viewer, you need to add the following line in the initialization of the viewer:

    printMode: telerikReportViewer.PrintModes.FORCE_PDF_FILE
    

     


    Neli

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  11. Piyush Bhatt
    Piyush Bhatt avatar
    20 posts
    Member since:
    Oct 2014

    Posted 17 Sep in reply to Neli Link to this post

    Neli,

    After adding the following option, the Print button now exports the report as PDF file but it does not show the Print Dialog automatically. Our JS version is 10.2.16.1025. 

    -Piyush 

    printMode: telerikReportViewer.PrintModes.FORCE_PDF_FILE

  12. Michael
    Michael avatar
    1 posts
    Member since:
    Sep 2019

    Posted 19 Sep Link to this post

    Hello to anyone looking for a workaround for the WebForms (non-HTML5) version of the Telerik ReportViewer.

    We've managed to get a workaround in place that restores the old functionality on Chrome v77. I've posted this to the bug report, but may as well also post it here for anyone that might stumble across this thread in the future. In order to get this to work, we need to override one of the ReportViewer functions. We can do this by adding an inline script block immediately following the telerik:ReportViewer element on our aspx page as follows:

     

    <body>
        <div>
            <telerik:ReportViewer ID="PopupReportViewer" runat="server"></telerik:ReportViewer>
            <script type="text/javascript">
                // Overriding the PDF method of report printing
                ReportViewer.prototype.PrintReport = function () {
                    switch (this.defaultPrintFormat) {
                        case "Default":
                            this.DefaultPrint();
                            break;
                        case "PDF":
                            this.PrintAs("PDF");
                            previewFrame = document.getElementById(this.previewFrameID);
                            previewFrame.onload = function () {
                                this.contentDocument.execCommand("print", true, null);
                            }
                            break;
                    }
                };
            </script>
        </div>
    </body>

     

    What this does is overrides it with a nearly identical version of the PrintReport function, with one major difference. If you look at the javascript that is being used by the ReportViewer object, you can see that we the ReportViewer is rendering the report to PDF in an iframe. By reading through some of Telerik's responses, it seems like this PDF is embedded with a command to cause the print, but that's the problem that Chrome has patched out.

    What we're doing with this solution is waiting for the iframe to load, and then sending that inner document to print using a browser supported method: execCommand("print", true, null).

    We decided to do this because we were also having a problems with the webform workaround adding and moving things in our report. All testing has indicated that this workaround behaves as expected. We just wanted to give this back to the community since, for many of us, the solution of "download the new version and migrate to HTML5 ReportViewer" is simply unacceptable.

  13. Gurbuz
    Gurbuz avatar
    4 posts
    Member since:
    Mar 2016

    Posted 20 Sep in reply to Michael Link to this post

    Thanks, it works.
  14. Neli
    Admin
    Neli avatar
    190 posts

    Posted 20 Sep Link to this post

    Hi Michael,

    Thank you for the workaround for the old ASP.NET Web Forms Report Viewer

    Google Chrome has also a public thread on the topic: Chrome 77, pdf auto print dialog. We have already contacted Google with feedback and questions about the issue. Unfortunately, we haven't received a response yet.

    We will post an update if we have any new information.

    Regards,
    Neli
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  15. Lantice
    Lantice avatar
    1 posts
    Member since:
    Aug 2015

    Posted 23 Sep Link to this post

    Hi all

    I got the same problem too, waiting for any solution.

  16. WILFREDO
    WILFREDO avatar
    1 posts
    Member since:
    Jul 2012

    Posted 24 Sep Link to this post

    works nice..thanks
  17. Neli
    Admin
    Neli avatar
    190 posts

    Posted 26 Sep Link to this post

    Hi,

    The issue is already fixed in the R3 2019 release where the print button of the HTML5 Report Viewer renders the report for print purposes and opens it in a new browser tab. 

    For more information, refer to Print dialog doesn't open in Google Chrome 77.0.3865.75 KB article.

     

    Regards,
    Neli
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  18. Scott
    Scott avatar
    12 posts
    Member since:
    Feb 2008

    Posted 27 Sep in reply to Michael Link to this post

    Thanks Michael! This worked for me.
  19. Hans
    Hans  avatar
    6 posts
    Member since:
    Jun 2012

    Posted 02 Oct in reply to Neli Link to this post

    Neli said:

    Hi,

    The issue is already fixed in the R3 2019 release where the print button of the HTML5 Report Viewer renders the report for print purposes and opens it in a new browser tab. 

    For more information, refer to Print dialog doesn't open in Google Chrome 77.0.3865.75 KB article.

     

    Regards,
    Neli
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items

    This is not really a fix, it is different functionality. It is possible to get the print dialog to popup automatically still in Chrome 77, you just need to do it right.

  20. Lisa
    Lisa avatar
    11 posts
    Member since:
    Jul 2016

    Posted 02 Oct in reply to Michael Link to this post

    Question for those of you who have implemented this fix:  I implemented this last week and it worked like a charm.  30 minutes ago our server crashed due to running out of disk space.  We have no idea what is eating up this disk space, and this is the only change I have made recently.  Does this fix cause any temporary files to be generated that we need to clean up?

    Thanks,

    Lisa

  21. Neli
    Admin
    Neli avatar
    190 posts

    Posted 07 Oct Link to this post

    Hello Lisa,

    The behavior is not expected. I need to know:

    - which report viewer do you use;

    - the version of Telerik Reporting;

    - which approach did you apply from the KB article? 

    You may also try to check the memory consumption through some tool.

    Regards,
    Neli
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  22. Kunal
    Kunal avatar
    2 posts
    Member since:
    Oct 2019

    Posted 25 Oct Link to this post

    Hello,

    The issue is already fixed in the R3 2019 release( Print Dialog doesn't appear in Google Chrome 77.0.3865.75.) where the print button of the HTML5 Report Viewer renders the report for print purposes and opens it in a new browser tab. 

    Its not really fix, it is different functionality. Is there any way possible to have same functionality in chrome browser like I.E browser(to have print dialog on print button click) ?

    Current version that we are using is telerikReportViewer-10.1.16.615

    Also after updating to R3 2019 release, it seems we are asking the user to take too many steps to actual print. User clicks Output...user clicks Print...user clicks Print. Is there a way to streamline this a bit more to where I click Print one time?

    Thanks,

    -Kunal

  23. Kunal
    Kunal avatar
    2 posts
    Member since:
    Oct 2019

    Posted 28 Oct Link to this post

    Hello Support Team,

    Can anyone please provide any suggestion on below points:

    Also after updating to R3 2019 release, it seems we are asking the user to take too many steps to actual print. User clicks Output...user clicks Print...user clicks Print. Is there a way to streamline this a bit more to where I click Print one time?

     

    Thanks,

    Kunal

  24. Neli
    Admin
    Neli avatar
    190 posts

    Posted 29 Oct Link to this post

    Hi Kunal,

    Note that the new printing behavior is imposed by the browser due to security reasons and it is beyond the Telerik Reporting control. For the new HTML5-based viewers, you can apply the Workaround for the HTML5-based Report Viewers which allows you to trigger the print dialog on Print click. 

    Regards,
    Neli
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top