This example prints and exports a report in a browser without previewing it on a web page.
On the server side, add a controller action to:
- create a report;
- export the report to PDF: you can do so asynchronously using the XtraReport.ExportToPdfAsync method;
- send back to the client.
On the client-side, two options are available:
-
Print a report in a new tab. Create a print button and invoke a new tab by using the client-side
window.Open(url, "_blank")
method to open a new tab and allow clients to print a document. -
Print a report with iFrame. Once a client clicks the print button, invoke the browser's Print dialog in the
HTMLIFrameElement
so that users can proceed with printing the document.
Create a server-side controller action to export a report to a format selected by a user.
- How to Print and Export a Report in the ASP.NET Core Application without the Document Viewer
- Reporting for ASP.NET MVC - How to print or export a report without showing a preview
- Reporting for ASP.NET WebForms - How to print or export a report without showing a preview
(you will be redirected to DevExpress.com to submit your response)