XRPageInfo.TextFormatString Property
Specifies the output format for content of the XRPageInfo control.
Namespace: DevExpress.XtraReports.UI
Assembly: DevExpress.XtraReports.v24.2.dll
NuGet Package: DevExpress.Reporting.Core
#Declaration
#Property Value
Type | Description |
---|---|
String | The output format for content of the XRPage |
#Remarks
The TextFormatString property allows you to specify an output format for data stored in the XRPageInfo‘s PageInfo property.
Note
Ensure the specified format string fits the type of the data. For instance, in the code example below the expression {0:MMMM d, yyyy} expects the Page
#Example
The following code example shows how to display the current date and time, and specify their output format.
Note
Refer to the following help topic for information on how to format data at design time: Format Data.
using DevExpress.XtraReports.UI;
// ...
// Create a XRPageInfo control.
XRPageInfo pageInfo = new XRPageInfo() {
PageInfo = DevExpress.XtraPrinting.PageInfo.DateTime,
WidthF = 250,
// Specify a format string for the control's page info.
TextFormatString = "{0:MMMM d, yyyy}"
};
// Create a report with the page info.
XtraReport report = new XtraReport() {
Bands = {
new DetailBand() {
HeightF = 15,
Controls = {pageInfo}
}
}
};
Tip
Use the Document.