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

XRPageBreak() Constructor

In This Article

Initializes a new instance of the XRPageBreak class with the default settings.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v24.2.dll

NuGet Package: DevExpress.Reporting.Core

#Declaration

public XRPageBreak()

#Example

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);
}
See Also