The requested page is not available for the requested platform. You are viewing the content for Default platform.

XtraReport.SaveLayout(String) Method

Saves the report's definition (layout and configuration) to a file in the REPX format.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.1.dll


public void SaveLayout(
    string fileName
Public Sub SaveLayout(
    fileName As String


Name Type Description
fileName String

A String containing the full path (including the file name) specifying where the report's definition will be saved.


A report definition contains all report settings, as well as settings of report controls. To load the report's definition from a REPX file, use the XtraReport.LoadLayout and XtraReport.FromFile methods.

Alternatively, to save a report definition in an XML format, use the XtraReport.SaveLayoutToXml.

To learn more, see Storing Report Layouts.


This example demonstrates how to save a report definition to a REPX file (by using the XtraReport.SaveLayout method) and how to load this definition (by using the XtraReport.LoadLayout method).

using DevExpress.XtraReports.UI;
using System.Windows.Forms;
// ...

// A temporary path to save a report to.
string filePath = @"C:\Temp\XtraReport1.repx";

private void button1_Click(object sender, System.EventArgs e) {
    // Create a report.
    XtraReport1 report = new XtraReport1();

    // Save a report's layout to the configuration file.

private void button2_Click(object sender, System.EventArgs e) {
    // Create a report.
    XtraReport1 report = new XtraReport1();

    // Load a report's layout from the specified file.

    // Display the print preview.
    ReportPrintTool pt = new ReportPrintTool(report);
See Also