Skip to main content

XRDesignPanel.SaveReport() Method

Saves the definition of the report currently open in the XRDesignPanel, to the file specified by the XRDesignPanel.FileName property.

Namespace: DevExpress.XtraReports.UserDesigner

Assembly: DevExpress.XtraReports.v24.1.Extensions.dll

NuGet Package: DevExpress.Win.Reporting

Declaration

public void SaveReport()

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). So, it’s implied that the XRDesignPanel.FileName property should be set to a valid path and file name. And, if the XRDesignPanel.FileName property returns an invalid path, this method invokes the XRDesignPanel.SaveReportAs method.

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();
See Also