Subreport

The properties of a subreport are:

Property Name Description Editable Formula Controllable Data Type
General
Class Type Displays the class type of the object. N N _
Data Inherit Indicates whether the data of this object is inherited from another object or not. N N _
Dataset Displays the name of the dataset used by the object. N N _
Geometry
X The horizontal coordinate of the left top corner in the container. Y N Float
Y The vertical coordinate of the left top corner in the container. Y N Float
Width The width of the object. Y N Float
Height The height of the object. Y N Float
Color
Background The background color. Y Y String
CSS
Style Applies a style to the object. Y N 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
Others
Position Specifies how to position the object. N 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 object 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
Suppress When Empty If there is no value returned for the subreport and this property value is true, the subreport will be suppressed. Y Y Boolean
Embedded Specifies whether or not to regard the subreport as an embedded object. Y Y Boolean
Records per Page Sets the number of records in each page in the data buffer. Y Y Integer
Maximum Page Number Sets the maximum number of pages in the data buffer. Y Y Integer
Subreport Data Source Name Displays the name of the data source used by the subreport. If nothing is displayed, the default data source will be used. N N String
Subreport Query Name Displays the name of the query used by the subreport. N N String
Subreport Security Name Displays the security name (record level security) used by the subreport. N N String
Cache Specifies whether to cache the subreport data buffer to improve the performance. Y Y Boolean
Excel
Column Index

Specifies the X 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, Column Index property of the 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
Border Color The color of the border. Y Y String
TOC
TOC Anchor Specifies whether or not to add the node that represents this object to the TOC tree. 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. Y Y String

Embedded

The default value is false which means the subreport is inserted as an object. The properties used to control page break in the subreports such as Fill Whole Page, On New Page, UnderLay, Keep Group Together, Cross Page will not work. Also, the properties cannot be controlled by formulas. If you set the Embedded property to be true, the subreport will work as an actual report. For details, refer to User's Guide | Editing a Report | Subreport, Embedded Subreport and Chart.

Cache

In a report, when the subreport needs to be run more than once, set the property Cache to true. The data of the subreport will be cached in the data buffer. When the subreport is run the next time, the sub-engine will retrieve the data from the data buffer instead of DBMS, and if sub-link exists, it will also be calculated in the data buffer, thus improving the engine performance.

When a data buffer is defined in the sub-engine, the data buffer is divided into many pages and records are allocated in the pages. You can use the properties Records per Page and Maximum Page Number to set the number of the records in one page and the maximum number of pages in the data buffer. If enough physical memory is available and you know the total record number of the subreport, to achieve a better performance, you can set Records per Page approximate to the total record number.

Note: The Cache property will not work in the following cases: