Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 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

IReportDesignerModelBuilder.ReportPreviewSettings(Action<ReportPreviewSettings>) Method

Specifies settings that apply to the Report Designer Preview.

Namespace: DevExpress.XtraReports.Web.ReportDesigner.Services

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

NuGet Package: DevExpress.Web.Reporting.Common

#Declaration

#Parameters

Name Type Description
configure Action<ReportPreviewSettings>

A Action that modifies initial preview settings.

#Returns

Type Description
IReportDesignerModelBuilder

A IReportDesignerModelBuilder that can be used to further configure the Report Designer.

#Remarks

The following code example is a controller that disables an additional dialog in the Report Designer Preview that allows users to download the PDF file sent to printing.

public IActionResult ReportDesigner(
    [FromServices] IReportDesignerModelBuilder reportDesignerModelBuilder, 
    [FromQuery] string reportName) {
    reportName = string.IsNullOrEmpty(reportName) ? "TestReport" : reportName;
    var designerModel = reportDesignerModelBuilder
        .Report(reportName)
        .ReportPreviewSettings(p=> {
            p.ExportSettings.ShowPrintNotificationDialog = false;
        })
        .BuildModel();
    return View(designerModel);
}
See Also