Back to Devexpress

Display the Current Date and Time in a Report

xtrareports-5291-feature-guide-to-devexpress-reports-add-extra-information-display-the-current-date-and-time-in-a-report.md

latest2.0 KB
Original Source

Display the Current Date and Time in a Report

  • Feb 18, 2026

This tutorial demonstrates how to insert the current system date and time into a report using the XRPageInfo control.

Follow the steps below to include information about the current date and time into a report:

  1. In the Visual Studio Report Designer, switch to the Field List, select the ProductName and UnitPrice fields, and drag-and-drop them onto the report’s Detail band.

  2. Typically, the current date and time are displayed within the Report Header band. To add it to the report, right click anywhere on the report’s surface. In the invoked menu, point to Insert Band and click ReportHeader.

  3. Drop the XRPageInfo control from the DX.25.2: Report Controls Toolbox tab onto the ReportHeader band.

  4. Set the control’s XRPageInfo.PageInfo property to DateTime (e.g., using its smart tag).

  5. To apply a format string to the control’s contents, type Created at {0:h:mm tt dd MMMM yyyy} into its XRPageInfo.TextFormatString property.

See Also

Display the User Name in a Report

Add Page Numbers