IReportDesignerModelBuilder.ReportPreviewSettings(Action<ReportPreviewSettings>) Method
In This Article
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<Report |
A Action that modifies initial preview settings. |
#Returns
Type | Description |
---|---|
IReport |
A IReport |
#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