Skip to main content

WebDocumentViewerOperationLogger.ReportLoadedFromLayout(String, XtraReport, out CachedReportSourceWeb) Method

Called when a report is restored from a serialized layout contained in a storage medium (file system, cloud services) under certain conditions.

Namespace: DevExpress.XtraReports.Web.WebDocumentViewer

Assembly: DevExpress.XtraReports.v23.2.Web.dll

NuGet Package: DevExpress.Web.Reporting.Common

Declaration

public virtual void ReportLoadedFromLayout(
    string reportId,
    XtraReport report,
    out CachedReportSourceWeb cachedReportSourceWeb
)

Parameters

Name Type Description
reportId String

A report identifier.

report XtraReport

An XtraReport instance that is the loaded report.

cachedReportSourceWeb CachedReportSourceWeb

A CachedReportSourceWeb object that is the mediator between a report and a Web Document Viewer.

Remarks

The ReportLoadedFromLayout method is called when the Document Viewer or Report Designer Preview opens a report and the following conditions are met:

  • a method that opens a report receives a report instance as a parameter. If a report is specified by a string (report url or ID), the IWebDocumentViewerReportResolver service methods are called instead.
  • the reporting application operates in a distributed environment (Azure cloud services, Web farms or Web gardens) and the UseFileReportStorage or UseAzureEnvironment method is called at application startup.
  • the report is initially loaded, and after some time the report cache is cleared (i.e., the report is unloaded/removed from memory). The viewer attempts to reload the report from the previously saved layout. Note that the PreviewReportCustomizationService methods are called instead on the initial load.

The ReportLoadedFromLayout method may include a custom code required to add data that was not stored in the serialized layout. You can use this method to:

  • update the report’s data source connection string;
  • re-create an object data source bound to the report.

When an application operates in a distributed clustered environment, this method overload allows you to specify the CachedReportSourceWeb object instance required to preview a report in the Report Designer.

See Also