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

XRPageInfo Class

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

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.1.dll

Declaration

public class XRPageInfo :
    XRControl,
    IXtraSupportShouldSerialize
Public Class XRPageInfo
    Inherits XRControl
    Implements 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.1: 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.

Examples

The following method demonstrates how to create an XRPageInfo object, and set some of 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;
}

Inheritance

Implements

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