XRPageInfo Class

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

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v20.1.dll

Declaration

public class XRPageInfo :
    XRControl,
    IXtraSupportShouldSerialize
Public Class XRPageInfo
    Inherits XRControl
    Implements IXtraSupportShouldSerialize

Remarks

General Information

XRPageInfo displays auxiliary information on report pages:

  • date and time
  • page numbers
  • user name

To add the XRPageInfo control to a report, drag the XRPageInfo item from the DX:20.1: Report Controls Toolbox tab and drop it on the report band.

versions-asp-lesson-2-06

The XRPageInfo.PageInfo property specifies the kind of information the control displays: page numbers, system date-time, and user name.

Features

For usage examples, review the following tutorials:

NOTE

This control cannot be bound to a data source's field. To display non-static information, use the XRLabel or XRRichText controls.

Use a combination of the XRPageInfo.PageInfo and XRPageInfo.TextFormatString properties to specify how the control displays information. Set the PageInfo property to PageInfo.NumberOfTotal and the TextFormatString the Page {0} of {1} string to display page count:

TIP

If a report contains at least one group, you can specify individual page numbers for report groups. Set the XRPageInfo.RunningBand property to the name of the group whose page numbers should be displayed.

Localization

To localize the date and time strings that the control displays, specify the PrintingSystemBase.Culture property. When a document is created, the property is set to the value of the current thread's culture to ensure consistency with other culture-sensitive formatting. Subsequently you can change it to display day and time values in another language.

You can localize a report and set the XRPageInfo.TextFormatString property to different values for different languages. Thi method allows you to translate format strings such as Page {0} of {1} to the report's language.

Examples

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

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

public XRPageInfo CreateXRPageInfo() {
   XRPageInfo pageInfo1 = new XRPageInfo
   {
      SizeF = new SizeF(200F, 50F),
      BackColor = Color.PaleGreen,
      PageInfo = PageInfo.DateTime,
      Format = "{0:MM/dd/yyyy}",
      StartPageNumber = 2;
   };
   return pageInfo1;
}

Implements

DevExpress.Utils.Serializing.Helpers.IXtraSupportShouldSerialize
See Also