ActiveReports 18 .NET Edition
Report Authors / Design Reports / Design Section Reports / Display Page Numbers and Report Dates
In This Topic
    Display Page Numbers and Report Dates
    In This Topic

    With the ReportInfo control available in a Section Report, you can display page numbers and report dates and times by selecting a value in the FormatString property. This property provides the following pre-defined options for page numbering and date and time formatting.

    Predefined Options and their Descriptions 

    Numbering Format Description
    Page {PageNumber} of {PageCount} on {RunDateTime} Display the page numbers along with Date and Time in the following format : Page 1 of 100 on 1/31/2012 2:45:50 PM
    Page {PageNumber} of {PageCount} Display the only the page numbers in the following format : Page 1 of 100
    {RunDateTime:} Display the Date and Time in the following format : 1/31/2012 2:45:50 PM
    {RunDateTime: M/d} Display the Date in the following format : 1/31
    {RunDateTime: M/d/yy} Display the Date in the following format : 1/31/12
    {RunDateTime: M/d/yyyy} Display the Date in the following format : 1/31/2012
    {RunDateTime: MM/dd/yy} Display the Date in the following format : 01/31/12
    {RunDateTime: MM/dd/yyyy} Display the Date in the following format : 01/31/2012
    {RunDateTime: d-MMM} Display the Date in the following format : 31-Jan
    {RunDateTime: d-MMM-yy} Display the Date in the following format : 31-Jan-12
    {RunDateTime: d-MMM-yyyy} Display the Date in the following format : 31-Jan-2012
    {RunDateTime: dd-MMM-yy} Display the Date in the following format : 31-Jan-12
    {RunDateTime: dd-MMM-yyyy} Display the Date in the following format : 31-Jan-2012
    {RunDateTime: MMM-yy} Display the Date in the following format : Jan-12
    {RunDateTime: MMM-yyyy} Display the Date in the following format : Jan-2012
    {RunDateTime: MMMM-yy} Display the Date in the following format : January-12
    {RunDateTime: MMMM-yyyy} Display the Date in the following format : January-2012
    {RunDateTime: MMMM d,yyyy} Display the Date in the following format : January 31, 2012
    {RunDateTime: M/d/yy h:mm tt} Display the Date and Time in the following format : 1/31/12 2:45 PM
    {RunDateTime: M/d/yyyy h:mm tt} Display the Date and Time in the following format : 1/31/2012 2:45 PM
    {RunDateTime: M/d/yy h:mm} Display the Date and Time in the following format : 1/31/12 2:45
    {RunDateTime: M/d/yyyy h:mm} Display the Date and Time in the following format : 1/31/2012 2:45

    Page numbering can also be set to a group level using the SummaryGroup and SummaryRunning properties.

    These steps assume that you have already added a Section Report to a project in Visual Studio. 

    Display page numbers and report dates on a report

    1. From the ActiveReports 18 Section report tab in the toolbox, drag the ReportInfo control to the desired location on the design surface.
    2. With the ReportInfo control selected in the Properties Panel, drop down the FormatString property.
    3. Select the pre-defined format that best suits your needs.
      Tip: You can customize the pre-defined formats in the Properties Panel. For example, if you change the FormatString property to Page {PageNumber} / {PageCount}, it shows the first page number as Page 1/1. For more information on creating formatting strings, see the Date, Time, and Number Formatting topic.

    Display page numbers and page count at the group level

    1. From the ActiveReports 18 Section report tab in the toolbox, drag the ReportInfo control to the GroupHeader or GroupFooter section of the report and set the FormatString property as above.
    2. With the ReportInfo control still selected in the Properties Panel, drop down the SummaryGroup property and select the group for which you want to display a page count.
    3. Drop down the SummaryRunning property and select Group.