Back to Devexpress

XRPageInfo.PageInfo Property

xtrareports-devexpress-dot-xtrareports-dot-ui-dot-xrpageinfo-0ae42d33.md

latest6.4 KB
Original Source

XRPageInfo.PageInfo Property

Gets or sets the value of the PageInfo type.

Namespace : DevExpress.XtraReports.UI

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

csharp
[DefaultValue(PageInfo.NumberOfTotal)]
[SRCategory(ReportStringId.CatBehavior)]
public PageInfo PageInfo { get; set; }
vb
<DefaultValue(PageInfo.NumberOfTotal)>
<SRCategory(ReportStringId.CatBehavior)>
Public Property PageInfo As PageInfo

Property Value

TypeDefaultDescription
PageInfoNumberOfTotal

A PageInfo enumeration value that determines the auxiliary information (date, page number etc.) displayed on each report page.

|

Available values:

NameDescription
None

Indicates that the PageInfoTextBrick.Format property value is displayed in the current PageInfoTextBrick.

| | Number |

Indicates that the current page number is displayed in the PageInfoBrick.

| | NumberOfTotal |

Indicates that both the current page number and the total number of pages in the current report are displayed in the current PageInfoBrick.

| | RomLowNumber |

Indicates that the current page number is displayed in the PageInfoBrick using roman numerals in lowercase.

| | RomHiNumber |

Indicates that the current page number is displayed in the PageInfoBrick using roman numerals in uppercase.

| | DateTime |

Indicates that the current date and time are displayed in the PageInfoBrick.

| | UserName |

Indicates that the user name for the current thread is displayed in the PageInfoBrick.

| | Total |

Indicates that the total number of pages is displayed in the PageInfoBrick.

|

Remarks

The information defined by the PageInfo enumeration is displayed in the PageInfoBrick object.

Example

The following code creates the XRPageInfo control and sets its properties:

csharp
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;
}
vb
Imports System.Drawing
Imports DevExpress.XtraPrinting
Imports DevExpress.XtraReports.UI
' ...

Public Function CreateXRPageInfo()
   Dim PageInfo1 As New XRPageInfo()
   PageInfo1.SizeF = New SizeF(200F, 50F)
   PageInfo1.BackColor = Color.PaleGreen
   PageInfo1.PageInfo = PageInfo.DateTime
   PageInfo1.Format = "{0:MM/dd/yyyy}"
   PageInfo1.StartPageNumber = 2
   Return PageInfo1
End Function

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

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.

web-forms-dashboard-add-custom-information-to-exported-dashboard/CS/WebDashboard_CustomExport/Default.aspx.cs#L54

csharp
XRPageInfo dateInfo = new XRPageInfo();
dateInfo.PageInfo = PageInfo.DateTime;
dateInfo.Format = "Created at {0:h:mm tt dd MMMM yyyy}";

winforms-dashboard-add-custom-information-to-the-exported-dashboard/CS/WinViewer_CustomExport/Form1.cs#L29

csharp
topMarginBand.Controls.Add(dateInfo);
dateInfo.PageInfo = PageInfo.DateTime;
dateInfo.Format = "Created at {0:h:mm tt dd MMMM yyyy}";

web-forms-dashboard-add-custom-information-to-exported-dashboard/VB/WebDashboard_CustomExport/Default.aspx.vb#L53

vb
Dim dateInfo As New XRPageInfo()
dateInfo.PageInfo = DevExpress.XtraPrinting.PageInfo.DateTime
dateInfo.Format = "Created at {0:h:mm tt dd MMMM yyyy}"

winforms-dashboard-add-custom-information-to-the-exported-dashboard/VB/WinViewer_CustomExport/Form1.vb#L28

vb
topMarginBand.Controls.Add(dateInfo)
dateInfo.PageInfo = DevExpress.XtraPrinting.PageInfo.DateTime
dateInfo.Format = "Created at {0:h:mm tt dd MMMM yyyy}"

See Also

Add Page Numbers

XRPageInfo Class

XRPageInfo Members

DevExpress.XtraReports.UI Namespace