The requested page is not available for the requested platform. You are viewing the content for Default platform.

XtraReport.PaperKind Property

Gets or sets the report's paper kind.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.2.dll

Declaration

[SRCategory(ReportStringId.CatPageSettings)]
[DefaultValue(PaperKind.Letter)]
public PaperKind PaperKind { get; set; }
<SRCategory(ReportStringId.CatPageSettings)>
<DefaultValue(PaperKind.Letter)>
Public Property PaperKind As PaperKind

Property Value

Type Default Description
PaperKind

Letter

The report's paper kind.

Remarks

Set the paper type to the Custom value to specify the report's XtraReport.PageWidth, XtraReport.PageHeight, and XtraReport.PageSize. Any other paper kind value sets the predefined report page width, height and size.

Note

The default PaperKind value depends on the global Report Units value:

If the PaperKind property is set to Custom, the printer paper is selected according to the XtraReport.PaperName property value. In this case, set the XtraReport.PageWidth and XtraReport.PageHeight properties to paper's width and height.

Examples

The code sample below creates a new report, sets its name, display name, paper kind and margins, and adds the Detail Band band with the XRLabel control on it.

result-static-report-runtime

using DevExpress.XtraReports.UI;

// ...

public static XtraReport CreateReport() {

    // Create an XtraReport instance
    XtraReport report = new XtraReport() {
        Name = "SimpleStaticReport",
        DisplayName = "Simple Static Report",
        PaperKind = PaperKind.Letter,
        Margins = new Margins(100, 100, 100, 100)
    };

    // Create a Detail band for the report
    DetailBand detailBand = new DetailBand() {
        HeightF = 25
    };

    // Add the created Detail band to the report
    report.Bands.Add(detailBand);

    // Create an XRLabel control for the report
    XRLabel helloWordLabel = new XRLabel() {
        Text = "Hello, World!",
        Font = new Font("Tahoma", 20f, FontStyle.Bold),
        BoundsF = new RectangleF(0, 0, 250, 50),
    };

    // Add the created XRLabel to the Detail band
    detailBand.Controls.Add(helloWordLabel);

    // Return the report with a band and a label on it
    return report;
}
See Also