Skip to main content

XtraReport.LoadLayout(String) Method

Loads a report from a file that contains a report definition, based on XML or CodeDOM serialization.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v24.1.dll

NuGet Package: DevExpress.Reporting.Core

Declaration

public void LoadLayout(
    string fileName
)

Parameters

Name Type Description
fileName String

A String that is the path and name of the file that contains a serialized report.

Remarks

TheLoadLayout method allows you to restore a report from a report definition file created with the following methods:

XtraReport.SaveLayout(String)
Saves the report definition to a file as a Code Document Object Model (CodeDOM) graph.
XtraReport.SaveLayoutToXml(String)
Saves the report in XML format to the specified file.
Save action in the End-User Designer
Review the following topic for more information: Save Report Layouts.

The default file extension for the report definition file is REPX.

TheLoadLayout method automatically determines whether the specified file contains a serialized XML or CodeDOM-based report and uses the appropriate procedure to load the report. For security reasons, you may decide to use the XtraReport.LoadLayoutFromXml(String) method instead, to load only XML-serialized reports.

Note

Deserialization of reports received from untrusted parties can trigger the execution of malicious code, which can either be directly embedded in the report definition or contained in an external assembly referenced by the report.

To avoid this, we recommend that you use XML serialization instead of CodeDOM (so that reports can be safely deserialized using the XtraReport.LoadLayoutFromXml method instead of the less secure LoadLayout method) and prevent any untrusted third-party libraries from being available on the server.

The CodeDOM serialization is not supported under the Full Trust permission level, and XML serialization is the only option to save reports.

Review the following topics for more information:

See Also