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

XRPageBreak Class

A Page Break control that defines a page delimiter in a report.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v18.2.dll

Declaration

[ToolboxTabName("DX.18.2: Report Controls")]
[XRDesigner("DevExpress.XtraReports.Design.XRPageBreakDesigner,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")]
[ToolboxBitmap(typeof(XRPageBreak))]
[XRToolboxSubcategory(3, 2)]
[ToolboxBitmap24("DevExpress.XtraReports.Images.Toolbox24x24.XRPageBreak.png,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")]
[ToolboxBitmap32("DevExpress.XtraReports.Images.Toolbox32x32.XRPageBreak.png,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")]
[ToolboxSvgImage("DevExpress.XtraReports.SvgImages.Controls.XRPageBreak.svg,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")]
public class XRPageBreak :
    XRControl
<ToolboxTabName("DX.18.2: Report Controls")>
<XRDesigner("DevExpress.XtraReports.Design.XRPageBreakDesigner,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")>
<ToolboxBitmap(GetType(XRPageBreak))>
<XRToolboxSubcategory(3, 2)>
<ToolboxBitmap24("DevExpress.XtraReports.Images.Toolbox24x24.XRPageBreak.png,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")>
<ToolboxBitmap32("DevExpress.XtraReports.Images.Toolbox32x32.XRPageBreak.png,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")>
<ToolboxSvgImage("DevExpress.XtraReports.SvgImages.Controls.XRPageBreak.svg,DevExpress.XtraReports.v18.2.Extensions, Version=18.2.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")>
Public Class XRPageBreak
    Inherits XRControl
    Implements

Remarks

Placing the XRPageBreak control onto a report creates a page break in the document at the control's location. All report content placed below the page break will be displayed on the new page.

When publishing a report that contains a page break placed in the middle of another non-text control (i.e., any control other than XRLabel), the page break is only inserted on the first occurrence of this control in the document.

To insert a page break before or after a specific report band, use the Band.PageBreak property.

To learn more, see the Adding Controls to a Report topic.

Examples

The following method demonstrates how to position two labels located within one band on two separate pages, using an XRPageBreak object.

using System.Drawing;
using DevExpress.XtraReports.UI;
// ...

public void UsingXRPageBreak(DetailBand Detail) {
   // Create two labels and an XRPageBreak object.
   XRLabel label1 = new XRLabel();
   XRLabel label2 = new XRLabel();
   XRPageBreak xrPageBreak0 = new XRPageBreak();

   // Add the controls to the Detail band.
   Detail.Controls.Add(label1);
   Detail.Controls.Add(label2);
   Detail.Controls.Add(xrPageBreak0);

   // Set the labels' text.
   label1.Text = "Label 1";
   label2.Text = "Label 2";

   // Set the location of the controls.

   // The first label is printed on the first page.
   label1.Location = new Point(100, 50);

   // Insert the page break.
   xrPageBreak0.Location = new Point(50, 150);

   // The second label is printed on the second page.
   label2.Location = new Point(100, 250);
}

Inheritance

Implements

DevExpress.XtraReports.Serialization.IXRSerializable
DevExpress.Utils.Serializing.Helpers.IXtraSupportDeserializeCollectionItem
DevExpress.Utils.Serializing.IXtraSerializable
See Also