XRDesignFormExBase.SaveReport(String) Method
Saves the definition (layout and configuration) of the report currently being edited in the End-User Designer form to the specified path.
Namespace: DevExpress.XtraReports.UserDesigner
Assembly: DevExpress.XtraReports.v24.2.Extensions.dll
NuGet Package: DevExpress.Win.Reporting
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
file |
String | A String containing the full path (including the file name) specifying where the report’s definition will be saved. |
#Remarks
This method saves a report’s definition to an REPX file in the same way as the XtraReport.SaveLayout method does.
Note that the SaveReport method is useful to save a file silently (without any prompt to a user). And, if the XRDesignPanel.FileName property returns an invalid path, this method invokes the XRDesignPanel.SaveReportAs method.
Note
The XRDesign
To learn more, refer to Storing Report Layouts.
#Example
This example demonstrates how to save a report currently being edited in the XRDesignPanel. To save a report silently (without any prompt to an end-user), you first need to specify the correct path to the report via the XRDesignPanel.FileName property. Then, call the XRDesignPanel.SaveReport method to save the report to the specified file path.
// A path to a REPX file.
string reportPath = "c:\\Report1.repx";
// Specify the report's path for the design panel.
xrDesignPanel1.FileName = reportPath;
// Save the report to the specified path.
xrDesignPanel1.SaveReport();