Skip to main content
All docs
V23.2

IReportDesignerModelBuilder.ReportPreviewSettings(Action<ReportPreviewSettings>) Method

Specifies settings that apply to the Report Designer Preview.

Namespace: DevExpress.XtraReports.Web.ReportDesigner.Services

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

NuGet Package: DevExpress.Web.Reporting.Common

Declaration

IReportDesignerModelBuilder ReportPreviewSettings(
    Action<ReportPreviewSettings> configure
)

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