Skip to main content
All docs
V25.1
  • DevExpress v25.1 Update — Your Feedback Matters

    Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

    Take the survey Not interested

    WebDocumentViewerBuilder.AutoStartBuild(Boolean) Method

    Specifies whether to start building a document automatically before the Document Viewer’s UI is rendered.

    Namespace: DevExpress.AspNetCore.Reporting.WebDocumentViewer

    Assembly: DevExpress.AspNetCore.Reporting.v25.1.dll

    NuGet Package: DevExpress.AspNetCore.Reporting

    #Declaration

    public WebDocumentViewerBuilder AutoStartBuild(
        bool autoStartBuild
    )

    #Parameters

    Name Type Description
    autoStartBuild Boolean

    true to start building a document automatically; otherwise, false.

    #Returns

    Type Description
    WebDocumentViewerBuilder

    A WebDocumentViewerBuilder that can be used to further configure the Document Viewer.

    #Remarks

    In ASP.NET Core MVC applications, the Web Document Viewer sends the startBuild request automatically before the Document Viewer’s UI is rendered (if there is no need to wait for parameter values in the UI). If the report has no visible parameters and you set parameter values in the ParametersInitialized event handler and call the Submit() method, the report is generated twice.

    Pass false to the AutoStartBuild method to disable automatic document generation:

    cshtml
    @model DevExpress.XtraReports.Web.WebDocumentViewer.WebDocumentViewerModel
    @{
        var viewerRender = Html.DevExpress().WebDocumentViewer("DocumentViewer")
            .Height("100%")
            .AutoStartBuild(false)
            .ClientSideEvents(configure => { 
                configure.ParametersInitialized("onParametersInitialized");
            })
            .Bind(Model);
        @viewerRender.RenderHtml()
    }
    @* ... *@
    
    See Also