XtraReport.LoadLayout(Stream) Method
SECURITY NOTE
Do not open/load files obtained from untrusted sources. Such files may pose a security risk. Please review the following article for additional information: Suppress Control Requests to Download Data from External URLs
Loads a report from a Stream that contains XML or CodeDOM-based serialized report.
Namespace: DevExpress.XtraReports.UI
Assembly: DevExpress.XtraReports.v24.2.dll
NuGet Package: DevExpress.Reporting.Core
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
stream | Stream | A Stream object that contains the report serialization data. |
#Remarks
TheLoadLayout
method allows you to deserialize a report from XML or CodeDOM-based serialization data created with the following methods:
- XtraReport.SaveLayout
- XtraReport.SaveLayoutToXml
- The Save action in the End-User Designer. Review the following topic for more information: Save Report Layouts.
Note
DevExpress Reports default configuration prohibits Codetrue
at application startup to allow Code
To avoid this, we recommend that you use XML serialization instead of Code
The Code
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(Stream) method instead, to load only XML-serialized reports.
Review the following topics for more information: