WebDocumentViewerOperationLogger.BuildStarting(String, XtraReport, ReportBuildProperties) Method
Called before starting to asynchronously build a report document.
Namespace: DevExpress.XtraReports.Web.WebDocumentViewer
Assembly: DevExpress.XtraReports.v19.1.Web.dll
NuGet Package: DevExpress.Web.Reporting.Common
Declaration
public virtual Action BuildStarting(
string reportId,
XtraReport report,
ReportBuildProperties buildProperties
)
Parameters
Name | Type | Description |
---|---|---|
reportId | String | A String value, identifying the report. |
report | XtraReport | An XtraReport object. |
buildProperties | ReportBuildProperties | A ReportBuildProperties object. |
Returns
Type | Description |
---|---|
Action | A Action delegate. |
Remarks
If a document is already built, calling this method will not build it one more time, asynchronously.
An action returned by this method is called in a separate thread on starting asynchronous building of a report document.
The following example illustrates how to use the BuildStarting method to provide synchronous building of report documents (e.g., to enable accessing HttpContext values in the XRControl.BeforePrint event handlers of a report).
using DevExpress.XtraReports.UI;
using DevExpress.XtraReports.Web.WebDocumentViewer;
using System;
// ...
public class ViewerOperationLogger : WebDocumentViewerOperationLogger {
public override Action BuildStarting(string reportId, XtraReport report, ReportBuildProperties buildProperties) {
report.CreateDocument();
return null;
}
}