This is a migrated thread and some comments may be shown as answers.

Could not print on Chrome 77

23 Answers 623 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dang Quang
Top achievements
Rank 1
Dang Quang asked on 12 Sep 2019, 05:11 AM
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?

23 Answers, 1 is accepted

Sort by
0
Gurbuz
Top achievements
Rank 1
answered on 12 Sep 2019, 06:16 AM
Exactly, we have the same error.
0
Steven
Top achievements
Rank 1
answered on 12 Sep 2019, 08:31 AM
Same here, we need either a fix or a workaround for this.
1
Dang Quang
Top achievements
Rank 1
answered on 12 Sep 2019, 08:50 AM
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
0
Gurbuz
Top achievements
Rank 1
answered on 12 Sep 2019, 11:24 AM

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);

 

 

0
Travis Cotton
Top achievements
Rank 1
answered on 12 Sep 2019, 02:05 PM
This is a critical issue.  Printing still works in Firefox but most of our user base is using Chrome.  Please advise.
0
Neli
Telerik team
answered on 12 Sep 2019, 02:11 PM

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
0
Lisa
Top achievements
Rank 1
answered on 12 Sep 2019, 04:44 PM
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.
0
E
Top achievements
Rank 1
answered on 12 Sep 2019, 05:46 PM
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?????!!!
0
Neli
Telerik team
answered on 13 Sep 2019, 12:41 PM

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
0
Piyush Bhatt
Top achievements
Rank 1
answered on 17 Sep 2019, 04:09 PM

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

0
Michael
Top achievements
Rank 1
answered on 19 Sep 2019, 08:57 PM

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.

0
Gurbuz
Top achievements
Rank 1
answered on 20 Sep 2019, 06:42 AM
Thanks, it works.
0
Neli
Telerik team
answered on 20 Sep 2019, 08:56 AM

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
0
Lantice
Top achievements
Rank 1
answered on 23 Sep 2019, 11:19 AM

Hi all

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

0
WILFREDO
Top achievements
Rank 1
answered on 24 Sep 2019, 03:19 PM
works nice..thanks
0
Neli
Telerik team
answered on 26 Sep 2019, 10:21 AM

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
0
Scott
Top achievements
Rank 1
answered on 27 Sep 2019, 03:28 PM
Thanks Michael! This worked for me.
0
Edzel
Top achievements
Rank 1
answered on 02 Oct 2019, 11:41 AM
[quote]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

[/quote]

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.

0
Lisa
Top achievements
Rank 1
answered on 02 Oct 2019, 09:53 PM

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

0
Neli
Telerik team
answered on 07 Oct 2019, 08:12 AM

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
0
Kunal
Top achievements
Rank 1
answered on 25 Oct 2019, 10:18 AM

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

0
Kunal
Top achievements
Rank 1
answered on 28 Oct 2019, 06:07 PM

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

0
Neli
Telerik team
answered on 29 Oct 2019, 02:33 PM

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
Tags
General Discussions
Asked by
Dang Quang
Top achievements
Rank 1
Answers by
Gurbuz
Top achievements
Rank 1
Steven
Top achievements
Rank 1
Dang Quang
Top achievements
Rank 1
Travis Cotton
Top achievements
Rank 1
Neli
Telerik team
Lisa
Top achievements
Rank 1
E
Top achievements
Rank 1
Piyush Bhatt
Top achievements
Rank 1
Michael
Top achievements
Rank 1
Lantice
Top achievements
Rank 1
WILFREDO
Top achievements
Rank 1
Scott
Top achievements
Rank 1
Edzel
Top achievements
Rank 1
Kunal
Top achievements
Rank 1
Share this question
or