Back to Devexpress

XtraReport.PageWidthF Property

xtrareports-devexpress-dot-xtrareports-dot-ui-dot-xtrareport-d363ac35.md

latest2.8 KB
Original Source

XtraReport.PageWidthF Property

Specifies the width of report pages (measured in report units). Applies only if the XtraReport.PaperKind property is set to Custom.

Namespace : DevExpress.XtraReports.UI

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

csharp
[DefaultValue(-1F)]
[SRCategory(ReportStringId.CatPageSettings)]
public float PageWidthF { get; set; }
vb
<SRCategory(ReportStringId.CatPageSettings)>
<DefaultValue(-1F)>
Public Property PageWidthF As Single

Property Value

TypeDefaultDescription
Single-1

Report page width.

|

Remarks

The width and height of report pages match the paper width and height specified by the XtraReport.PaperKind property. When you set the XtraReport.Landscape property to true, page width and height values are swapped.

Important

Page width and height can be customized only if XtraReport.PaperKind is Custom. Any other paper kind has predefined width and height.

The following code snippet creates a new report with a custom page size specified in inches:

csharp
using DevExpress.XtraReports.UI;
// ...
public static XtraReport CreateReport() {
    XtraReport report = new XtraReport() {
        ReportUnit = ReportUnit.Inches,
        PaperKind = DevExpress.Drawing.Printing.DXPaperKind.Custom,
        PageWidthF = 8.26f,
        PageHeightF = 11.69f
    };
    return report;
}
vb
Imports DevExpress.XtraReports.UI
' ...
Public Shared Function CreateReport() As XtraReport
    Dim report As New XtraReport() With {
        .ReportUnit = ReportUnit.Inches,
        .PaperKind = DevExpress.Drawing.Printing.DXPaperKind.Custom,
        .PageWidthF = 8.26F,
        .PageHeightF = 11.69F
    }
    Return report
End Function

See Also

XtraReport Class

XtraReport Members

DevExpress.XtraReports.UI Namespace