In ActiveReports, the ReportInfo control allows you 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.
For more information on creating formatting strings, see the Date, Time, and Number Formatting topic.
Important Properties
Property | Description |
---|---|
FormatString | Gets or sets the string used to display formatted page numbering or report date and time values in the control. |
Style | Gets or sets the style string for the control. This property reflects any settings you choose in the Font and ForeColor properties. |
SummaryGroup | Gets or sets the name of the GroupHeader section that is used to reset the number of pages when displaying group page numbering. |
Displaying page numbers and report dates
From the toolbox, drag the ReportInfo control to the desired location on the report.
With the ReportInfo control selected in the Properties window, drop down the FormatString property and select the preset value that best suits your needs.
Displaying group level page counts
With the control selected on the report, in the Commands section at the bottom of the Properties window, you can click the Property dialog command to open the dialog.
General
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.
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 window or Property dialog, it is a string.
Visible: Clear this check box to hide the control.
DataField: Select a field name from the data source to which to bind the control.
Appearance
Background Color: Select a color to use for the background of the control.
Font
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
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.
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.
RightToLeft: Select this check box to reverse the text direction.
Alignment
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.
Summary
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.