Skip to main content
A newer version of this page is available. .

XRPageInfo Class

A Page Information control that is used to display auxiliary information on report pages.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.2.dll

NuGet Package: DevExpress.Reporting.Core

Declaration

public class XRPageInfo :
    XRControl,
    IXtraSupportShouldSerialize

Remarks

XRPageInfo is used to display auxiliary information on report pages, such as date, time, page numbers or user name.

To add a new Page Info control to a report, drag the XRPageInfo item from the DX:19.2: Report Controls Toolbox tab and drop it onto the required report band.

versions-asp-lesson-2-06

To customize the XRPageInfo control, use the XRPageInfo.PageInfo property. It defines the kind of information the control displays: page numbers, system date-time, or user name.

For examples of different uses of this control, see the corresponding tutorials.

Note

Because usually this information is displayed in the Page Header/Footer and Top/Bottom Margin bands, you cannot bind the PageInfo property to a field from a data source. So, in order to display dynamic information, use the XRLabel or XRRichText controls instead.

In addition, a format string can be applied to a control’s contents. For example, you can change the control’s format to Page {0} of {1} using the XRPageInfo.TextFormatString property.

asp-lesson-2-07

When a report contains at least one group, you can specify individual page numbers for report groups, by setting the XRPageInfo.RunningBand property to the name of the required group.

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

Example

The following method demonstrates how to create an XRPageInfo object, and set its properties.

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

public XRPageInfo CreateXRPageInfo() {
   // Create an XRPageInfo object.
   XRPageInfo pageInfo1 = new XRPageInfo();

   // Set its size.
   pageInfo1.SizeF = new SizeF(200F, 50F);

   // Set its background color.
   pageInfo1.BackColor = Color.PaleGreen;

   // Set its data format.
   pageInfo1.PageInfo = PageInfo.DateTime;
   pageInfo1.Format = "{0:MM/dd/yyyy}";

   return pageInfo1;
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the XRPageInfo class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

Implements

DevExpress.XtraPrinting.IBrickOwner
DevExpress.Utils.Serializing.Helpers.IXtraSupportDeserializeCollectionItem
DevExpress.Utils.Serializing.IXtraSerializable
DevExpress.Utils.Serializing.Helpers.IXtraSupportShouldSerialize
See Also