Skip to main content

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

XRDesignMdiController.DefaultReportSettings Property

Provides access to the default report page settings.

Namespace: DevExpress.XtraReports.UserDesigner

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

NuGet Package: DevExpress.Win.Reporting

#Declaration

public ReportSettings DefaultReportSettings { get; }

#Property Value

Type Description
ReportSettings

Report page settings.

#Remarks

The StandardReportDesigner and RibbonReportDesigner components use the following default settings to create new reports:

Use the DefaultReportSettings property to change the default report settings.

#Change Default Report Settings at Design Time

When you drop a StandardReportDesigner or RibbonReportDesigner component to your form, a XRDesignMdiController item appears on your form called reportDesigner1.

ShowExportWarnings

Click reportDesigner1 and switch to the Properties window. Expand the DefaultReportSettings group.

ShowExportWarnings

Here you can change the default settings for report pages. Reports created in End-User Designer copy their report settings from the DefaultReportSettings object.

#Change Default Report Settings at Runtime

The code sample below illustrates how to create an End-User Designer instance and specify default report page settings.

using DevExpress.XtraReports.UI;
using DevExpress.Drawing.Printing;
using DevExpress.XtraReports.UserDesigner;
// ...
XRDesignForm form = new XRDesignForm();
XRDesignMdiController reportDesigner = form.DesignMdiController;
reportDesigner.DefaultReportSettings.PaperKind = DXPaperKind.Letter;
reportDesigner.DefaultReportSettings.Landscape = true;
reportDesigner.DefaultReportSettings.RollPaper = false;
reportDesigner.DefaultReportSettings.ReportUnit = ReportUnit.HundredthsOfAnInch;
reportDesigner.DefaultReportSettings.Margins = new System.Drawing.Printing.Margins(50, 50, 100, 100);
form.ShowDialog();
See Also