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

Printing directly using Html5.WebForms.ReportViewer

1 Answer 135 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Raul
Top achievements
Rank 1
Raul asked on 21 Nov 2017, 05:06 PM
Hi,

I'm currently using Telerik.ReportViewer.Html5.WebForms.ReportViewer (Telerik Reporting v11.2) to display a report on a webpage with some parameters. How can I invoke programatically the Print command from the WebForms.ReportViewer object to print directly without showing Print dialog Box.


Thanks.

1 Answer, 1 is accepted

Sort by
-1
Silviya
Telerik team
answered on 23 Nov 2017, 07:04 AM
Hello Raul,

The existing print functionality in web viewers is based on the following:
  1. The report is exported in PDF format;
  2. On rendering the PDF document, the reporting engine injects Adobe Javascript that forces the used PDF reader to open its Print dialog;
  3. The PDF file is sent to the client in browser in a hidden frame, where the browser must have properly configured and enabled Adobe PDF plugin to load the PDF file in the browser window;
  4. Once the PDF is loaded in the browser, hidden from the user, the Adobe PDF plugin used as PDF reader shows its Print dialog.

In the above scenario the Adobe PDF plugin is a must have for the browser. The approach is based on PDF export as applications running in browser do not have permissions to access the machine (technology restrictions). For more details, please check Printing Reports.

Based on this, I can suggest you to export programmatically a report in PDF, inject the mentioned Adobe Javascript, and load the PDF in browser. The Adobe PDF plugin will start its Print dialog automatically.

On report level, I can suggest you to print reports from the server machine with the default printer connected to it. In such scenario you have full control over the print operation and it can be performed without user interaction - PrintReport Method.

I hope this information will help.


Regards,
Silviya
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
Raul
Top achievements
Rank 1
Answers by
Silviya
Telerik team
Share this question
or