Summary field

The properties of a summary field are:

Property Name Description Editable Formula Controllable Data Type
General
Field Type Displays the class type of the object. N N _
Summary Name The summary name. N N _
Aggregate Function The function of the summary. N N _
Summary On The name of the field on which to perform the summary function. N N _
Group By The group field that the summary is based on. If it displays null, that indicates the summary is based on the whole dataset. N N _
Geometry
X The horizontal coordinate of the left top corner in the container. Y Y Float
Y The vertical coordinate of the left top corner in the container. Y Y Float
Width The width of the summary field. Y Y Float
Height The height of the summary field. Y Y Float
Color
Background The background color. Y Y String
Foreground The foreground color. Y Y String
CSS
Style Applies a style to the object. Y N String
ID An identifier for the summary field. It must be unique in the report set. The ID property can be a style sheet selector. Y Y String
Class This property assigns a class name to an object. Any number of objects may be assigned the same class name. On the other hand, assigns one or more class names to an object; the object may be said to belong to these classes. A class name may be shared by several objects. This property only has one role in JReport: as a style sheet selector (when an author wishes to assign style information to a set of objects). Y Y String
External CSS Class Selector Specifies the name of the class selector which will describe the style for the object when exporting the report result in HTML format. Y Y String
Excel
Column Index Specifies the X coordinate of the selected object in the exported XLS or CSV file. An object with this property value less than 1 will not be included in the exported XLS or CSV file. If you set the report property Columned to true, Column Index property of an object will be automatically set to a value according to its position in its parent. Y N Integer
Row Index Specifies the Y coordinate of the object in the exported XLS or CSV file. An object with this property value less than 1 will not be included in the exported XLS or CSV file. If you set the report property Columned to true, Row Index property of the object will be automatically set to a value according to its position in its parent. Y N Integer
Border
Border Thickness The width of the border. Y N Float
Top Line The line style of the top border. Y N Integer
Bottom Line The line style of the bottom border. Y N Integer
Left Line The line style of the left border. Y N Integer
Right Line The line style of the right border. Y N Integer
Shadow Specifies whether or not to draw a shadow. Y Y Boolean
Border Color The color of the border. Y Y String
Shadow Color The color of the shadow. Y Y String
Pattern
Pattern Color Specifies a color to draw a pattern to fill the summary field. Y Y String
Pattern Style The pattern of the summary field. Y N Integer
Text Format
Font Face The font to be used. Y Y String
Font Size The size of the text. Y N Float
Bold Specifies whether or not to make the text bold. Y Y Boolean
Italic Specifies whether or not to make the text italic. Y Y Boolean
Strikethrough Specifies whether or not to add a Strikethrough line to the text. Y Y Boolean
Underline Specifies whether or not to underline the contents. Y Y Boolean
Format The display format for the summary field. It varies with data type, and can be manually defined. Y Y String
Autofit Adjusts the width of the summary field according to the contents. Y Y Boolean
Maximum Width Often works with the Autofit property. If Autofit = true, Maximum Width is not equal to 0, the content will extend until the width is this value. Y N Float
Word Wrap Wrap the displayed content to the width. Y Y Boolean
Ignore HTML Tag If this property is set to true, HTML tag elements in the field value will be parsed while the report set is to be saved as an HTML file; or the field value will appear in the HTML file the same as that in JReport Designer (HTML tag elements in the field value, if any, will not be parsed). Y Y Boolean
Vertical Alignment Vertical justification of the text in the summary field. Y N Integer
Horizontal Alignment Horizontal justification of the text in the summary field. Y N Integer
Others
Position Indicates how to position the object. Y N Integer
Invisible If true, the object will not be displayed in both design and view modes. Y Y Boolean
Suppress If true, the object will not be displayed in view mode. Y Y Boolean
Suppress When No Records If true and no record returned for the data container, the object will not be displayed in view mode. Y Y Boolean
Record Location Specifies the calculation point for the properties of the object. Y N Integer
Export to CSV If false, the object will not be exported when the report result is to be exported to a CSV file. Y Y Boolean
Export to Excel If false, the summary field will not be exported when the report result is to be exported to an XLS file. (Make sure that Excel 2000 in the Export to XLS dialog is checked.) Y Y Boolean
Link Contains the link information. Y N String
Enable Hyperlink in PDF Specifies whether or not to contain the hyperlinks when exporting the result to a PDF file. Y Y Boolean
Enable Hyperlink in Excel Specifies whether or not to contain the hyperlinks when exporting the result to an XLS file. Y Y Boolean
Enable Hyperlink in HTML Specifies whether or not to contain the hyperlinks when exporting the result to an HTML file. Y Y Boolean
Detail Report Specifies the detail report that the summary is linked to. Not available for summary fields in a map. Y N String
Transfer Style Specifies whether or not to transfer the component style to the link report if the object is bound with a link to a report. Y Y Boolean
Go to Detail Specifies whether or not to enable the Go-to-detail action on the object. With this action enabled, you can click the object to show the detailed information in JReport Web. Y Y Boolean
Link Catalog Specifies the path and filename of the catalog that the link report belongs to. Y Y String
Filter Options Defines whether the filter-related shortcut menu items will be displayed when a user right-clicks the object in JReport Web. Y N Integer
Data Mapping File Specifies a data mapping file to the field for NLS use. Y Y String
Suppress When Null If true and the field value is null, the summary will not be displayed. Y Y Boolean
Display Null Specifies a string to be displayed if the field value is null. Y Y String
Column Name Substitutes the current field with another field. Y N String
Value Delimiter Specifies the separator for the data whose type is DBArray. The default value "LF" means that the elements will be displayed in a horizontal line and separated by a space. Y Y String
Cache Value Specifies to cache the value of this field instead of obtaining it repeatedly. Y N Boolean
TOC
TOC Anchor Specifies whether or not to add the node that represents this object to the TOC tree. Only applicable for summary in a banded object. Y Y Boolean
Anchor Display Value If TOC Anchor = true, the property value of Anchor Display Value will be displayed on the TOC tree as the text of the node representing the object. Only applicable for summary in a banded object. Y Y String

Pattern Style

This property is used for setting the style of the label pattern. It can be:

Format

This format is what will be displayed in the report result. That is, no matter in what kind of format the data is stored in your database, you can specify the format to be displayed in the result. For example, for a price of Number type, you can choose from the following formats:
#,###
#,###.##
$#,##0.00
...

If you select it as $#,##0.00, it will display as $6.05. You can enter manually as $#,##0.000. The field will then be displayed as $6.050.

Note: For the BigDecimal type, to avoid losing precision, you should enter a prefix JRD when setting the format property value.

Column Name

Normally, you are not allowed to modify this property. The summary is usually removed and another field is inserted directly in the report. However, if you want to substitute here, first click File > Options..., uncheck Forbid changing column in the Panel category of the Options dialog. Then go back to the Report Inspector, and select another field from the drop-down list.