InetSoft Reporting Software: Report Objects

The Element object is the base object of all other report objects. All other objects share its methods and properties. This section lists general properties of the Element object.

alignment

Specifies the horizontal and vertical alignment of an element. Its value is a bitwise OR of a horizontal alignment option and a vertical alignment option.

Horizontal Alignment

Vertical Alignment

StyleReport.H_LEFT

StyleReport.V_TOP

StyleReport.H_CENTER

StyleReport.V_CENTER

StyleReport.H_RIGHT

StyleReport.V_BOTTOM

StyleReport.H_CURRENCY

StyleReport.V_BASELINE


Type

integer

Example

alignment = StyleReport.H_CENTER | StyleReport.V_CENTER;
view demo icon
View a 2-minute demonstration of InetSoft's easy, agile, and robust BI software.

background

Specifies the background color that fills the entire area of the element.

Type

java.awt.Color

Example

background = java.awt.Color.lightGray;

font

Specifies the font for this element.

Type

java.awt.Font

Example

font = new java.awt.Font("Arial", java.awt.Font.BOLD, 12);

foreground

Specifies the foreground (text) color of the element.

Type

java.awt.Color

Example

foreground = java.awt.Color.red;

indent

Specifies the indentation (in inches) if the element is the first on the line.

Type

double

Example

indent = 0.5;

keepWithNext

Specifies that the element should be kept on the same page as the next element.

Type

Boolean

Example

keepWithNext = true;

sectionID

The ID of the Section containing the element. If the element is not in a Section, then sectionID is undefined.

Type

string

Example

var table1 = report['sectionID'].table;

sectionLevel

If the element is contained in a grouped Section, returns the grouping level of the element's sub-group. Otherwise, sectionLevel is undefined.

Type

integer

Example

var level = sectionLevel;

sectionRow

The index of the Section row with which the element is associated. If the element is not in a Section, then sectionRow is undefined.

Type

integer

Example

 var table1 = report['sectionID'].table;
 var row = table1[sectionRow];

sectionType

The type of Section band that contains the element. The type values are 'Header', 'Content', and 'Footer'. If the element is not in a Section, then sectionType is undefined

Type

string

Example

 if(sectionType == "Footer") {...}
Read how InetSoft was rated #3 for implementation in G2 Crowd's user survey-based index.

spacing

Specifies the line spacing (points) for a Text element.

Type

integer

Example

spacing = 1;

target

Specifies a target (anchor for a hyperlink) on this element.

Type

string

Example

target = text;

visible

Specifies the visibility of the element. This property can be used to dynamically hide elements in a report.

Type

Boolean

Example

visible = parseInt(text) > 0;

value

Returns the integer value of an element within a Section.

Type

integer

Example

 if(text54.value < 100) {
    ...
 }

position

Specifies the position of an element within a Section.

Type

number array

Example

position = [80, position.y];
view gallery
View live interactive examples in InetSoft's dashboard and visualization gallery.

field

Returns the current value bound to an element within a Section. The field property uses the name of the bound data field (rather than the element's ID) to refer to the element's value. If the element that references the field array is not within a Section, then the field property is undefined. Modifications to the field array have no effect on elements.

The field array provides read-only access to the values of all bound elements in the current band/row, and is accessible from every element inside the band.

The field array provides the original data bound to the element, not the string representation provide by the Text Property. Therefor, if a column has type Date, the field array returns a Date object.

Return

original value bound to an element in the Section

Example

field['customer_id'] + ':' + field['quantity'];

hints

Specifies that a column added to a Section using script is included when the report is exported in CSV format. The value you specify for the property becomes the name of the column in the exported file.

Example

hints['csv.column'] = 'NewColumn';

This property must be set in the Section element's script, not in the script of an element within the Section.

Previous: Reporting JavaScript Object Reference Next: Reports Function Reference