This example demonstrates how to print or export a report in an ASP.NET MVC application without displaying this report's preview.
Follow the steps below to print or export a report:
- Call one of the report's ExportTo... methods to obtain an exported document.
- Call the Controller.File method to convert the exported document into a FileContentResult object.
Follow the steps below to print a report:
- Export the report to PDF.
- Return the exported PDF file as an action result with the Content-Disposition header set to inline.
- The returned PDF is opened by the browser's built-in PDF viewer. To avoid this, export the PDF to a separate iframe - only the print dialog is displayed.
- FilterConfig.cs (VB: FilterConfig.vb)
- RouteConfig.cs (VB: RouteConfig.vb)
- WebApiConfig.cs (VB: WebApiConfig.vb)
- HomeController.cs (VB: HomeController.vb)
- ExportModel.cs (VB: ExportModel.vb)
- Index.cshtml
- E454: How to print a report without displaying it in a web application
- How to print/export XtraReport in an ASP.NET WebForms application without showing a report preview
- How to print and export DevExpress reports without previewing them on a web page in an ASP.NET Core Angular application
(you will be redirected to DevExpress.com to submit your response)