Main menu
Tag Archives: Save
This article shows how to save a DevExpress report in a file format supported by the Report Viewer control. It covers basic implementation of the Save to file operation. Other features (such as pagination, sharing) are covered in a separate article.
The most obvious and typical use case is saving a report to a file with the Report Viewer control. The supported formats include all the common file formats used by the underlying viewer (PDF, XPS, CSV, HTML, PDF/A, RTF).
The.NET Framework has built-in support for creating PDF documents. The Report Viewer control supports saving and opening documents created by this mechanism. In this article, we will cover how to save a report in PDF format.
The Report Viewer control supports saving a report in PDF format. In this case, the "Save to file" operation will open the Save as dialog box where you may pick a destination folder for the saved file.
How to save a report to a file?
The Save to file operation only affects the data that is stored in the Report. To save a report to a file, you must first retrieve the data of the report and set it to the report parameter. The data must be set before the report is rendered.
1. Retrieve data and set to report parameter
The most straightforward way to retrieve the report data is to retrieve it from the dataset that is used to create the report and assign it to a report parameter. In this example, the parameter report is created with the report data and then saved to the file.
2. Create the report parameter
The data of the report parameter will be used to create the PDF file. The report parameter must be defined before the report is rendered. For example, the report parameter report must be created before the report is rendered. You can use any name for the report parameter.
Note that all report parameters (including the report parameter) will be processed once when the report is saved.
3. Render the report
When the report is rendered, the report data will be retrieved and set to the report parameter. For example, the data retrieved from the
Related links:
Comments