ActiveReports 18 .NET Edition
Report Authors / Report Controls / Report Controls in Section Report / ReportInfo
In This Topic
    ReportInfo
    In This Topic

    You can use the ReportInfo control in section reports to quickly display page numbers, page counts, and report dates. The ReportInfo control is a text box with a selection of preset FormatString options. You can set page counts to count the pages for the entire report, or for a specified group.

    You can customize the preset values by editing the string after you select it. For example, if you want to display the total number of pages in the ReportHeader section, you can enter a value like: Total of {PageCount} pages

    See Date, Time, and Number Formatting for information on creating formatting strings

    Caution: With large reports using the CacheToDisk property, placing page counts in header sections may have an adverse effect on memory as well as rendering speed. Since the rendering of the header is delayed until ActiveReports determines the page count of the following sections, CacheToDisk is unable to perform any optimization.  For more information on this concept, see Optimizing Section Reports.

    ReportInfo Dialog Properties

    You can set the ReportInfo properties in the ReportInfo dialog. To open it, with the ReportInfo selected on the report, under the Properties panel, click the Property dialog link.

    Name: Enter a name for the control that is unique within the report. This name is displayed in the Document Outline and in XML exports. You can only use underscore (_) as a special character in the Name field. Other special characters such as period (.), space ( ), forward slash (/), backslash (\), exclamation (!), and hyphen (-) are not supported.

    Tag: Enter a string that you want to persist with the control. If you access this property in code, it is an object, but in the Properties panel or Property dialog, it is a string.

    Visible: Clear this check box to hide the control.

    Background Color: Select a color to use for the background of the control.

    Name: Select a font family name or a theme font.

    Size: Choose the size in points for the font.

    Style: Choose Normal or Italic.

    Weight: Choose from Normal or Bold.

    Color: Choose a color to use for the text.

    Decoration: Select check boxes for Underline and Strikeout.

    GDI Charset: Enter a value to indicate the GDI character set to use. For a list of valid values, see MSDN Font.GDICharSet Property.

    GDI Vertical: Select this checkbox to indicate that the font is derived from a GDI vertical font.

    Format string: Select a formatted page numbering or report date and time value to display in the control. You may also type in this box to change or add text to display along with the formatted date and page number values.

    Multiline: Select this check box to allow text to render on multiple lines within the control.

    ReportInfo height

    Can increase to accommodate contents: Select this check box to set CanGrow to True.

    Can decrease to accommodate contents: Select this check box to set CanShrink to True.

    Text direction

    RightToLeft: Select this check box to reverse the text direction.

    Vertical alignment: Choose Top, Middle, or Bottom.

    Horizontal alignment: Choose Left, Center, Right, or Justify.

    Wrap mode: Choose NoWrap, WordWrap, or CharWrap to select whether to wrap words or characters to the next line.

    SummaryGroup: Select a GroupHeader section in the report to display the number of pages in each group when using the PageCount.

    SummaryRunning: Select None, Group, or All to display a summarized value.

    Displaying Page Numbers and Report Dates

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

    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/2020 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/2020 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/20
    {RunDateTime: M/d/yyyy} Display the Date in the following format : 1/31/2020
    {RunDateTime: MM/dd/yy} Display the Date in the following format : 01/31/20
    {RunDateTime: MM/dd/yyyy} Display the Date in the following format : 01/31/2020
    {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-20
    {RunDateTime: d-MMM-yyyy} Display the Date in the following format : 31-Jan-2020
    {RunDateTime: dd-MMM-yy} Display the Date in the following format : 31-Jan-20
    {RunDateTime: dd-MMM-yyyy} Display the Date in the following format : 31-Jan-2020
    {RunDateTime: MMM-yy} Display the Date in the following format : Jan-20
    {RunDateTime: MMM-yyyy} Display the Date in the following format : Jan-2020
    {RunDateTime: MMMM-yy} Display the Date in the following format : January-20
    {RunDateTime: MMMM-yyyy} Display the Date in the following format : January-2020
    {RunDateTime: MMMM d,yyyy} Display the Date in the following format : January 31, 2020
    {RunDateTime: M/d/yy h:mm tt} Display the Date and Time in the following format : 1/31/20 2:45 PM
    {RunDateTime: M/d/yyyy h:mm tt} Display the Date and Time in the following format : 1/31/2020 2:45 PM
    {RunDateTime: M/d/yy h:mm} Display the Date and Time in the following format : 1/31/20 2:45
    {RunDateTime: M/d/yyyy h:mm} Display the Date and Time in the following format : 1/31/2020 2:45
    1. From the Toolbox, drag the ReportInfo control to the desired location on the report.
    2. With the ReportInfo control selected in the Properties panel, drop down the FormatString property and select the preset value that best suits your needs.

    Displaying Group Level Page Counts

    1. From the toolbox, add the ReportInfo control to the GroupHeader or GroupFooter section of a report and set the FormatString property to a value that includes PageCount.
    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.