ReportExportSettings.ExportFormat Property
Sets the default export format in Print Preview.
Namespace: DevExpress.XtraReports.UserDesigner
Assembly: DevExpress.XtraReports.v25.2.dll
NuGet Package: DevExpress.Reporting.Core
Declaration
Property Value
| Type | Default | Description |
|---|---|---|
| ExportFormat | The default export format. |
Available values:
| Name | Description |
|---|---|
The PDF export format. |
|
| Htm | The HTML export format. |
| Mht | The MHT export format. |
| Rtf | The RTF export format. |
| Docx | The DOCX export format. |
| Xls | The XLS export format. |
| Xlsx | The XLSX export format. |
| Csv | The CSV export format. |
| Txt | The TXT export format. |
| Image | The image export format. |
| Xps | The XPS export format. |
| Prnx | The PRNX export format. For internal use only. |
Property Paths
You can access this nested property as listed below:
| Object Type | Path to ExportFormat |
|---|---|
| ReportSettingsBase |
|
Remarks
The following code snippet specifies the initial export name and export format for new reports created in the End-User Report Designer:
The following code sample creates an End-User Designer instance and specifies default settings for its reports:
using DevExpress.XtraReports.UI;
using DevExpress.Drawing.Printing;
using DevExpress.XtraReports.UserDesigner;
// ...
XRDesignForm form = new XRDesignForm();
XRDesignMdiController reportDesigner = form.DesignMdiController;
// Report Page Settings
reportDesigner.DefaultReportSettings.PaperKind = DXPaperKind.Letter;
reportDesigner.DefaultReportSettings.Landscape = true;
reportDesigner.DefaultReportSettings.RollPaper = false;
reportDesigner.DefaultReportSettings.ReportUnit = ReportUnit.HundredthsOfAnInch;
reportDesigner.DefaultReportSettings.Margins = new System.Drawing.Printing.Margins(50, 50, 100, 100);
// Report Font Settings
reportDesigner1.DefaultReportSettings.Font = new DevExpress.Drawing.DXFont("Arial", 12f);
// Report Export Settings
reportDesigner.DefaultReportSettings.ExportSettings.FileName = "TestReport";
reportDesigner.DefaultReportSettings.ExportSettings.ExportFormat = DevExpress.XtraPrinting.ExportFormat.Xlsx;
// Report Layout Settings
reportDesigner.DefaultReportSettings.DesignerSettings.DrawGrid = false;
reportDesigner.DefaultReportSettings.DesignerSettings.SnappingMode = DevExpress.XtraReports.UI.SnappingMode.SnapToGridAndSnapLines;
form.ShowDialog();