public class Group extends java.lang.Object implements java.io.Serializable, com.inet.report.ReferenceHolder, com.inet.report.ReferencedObject, NodeParser, java.lang.Cloneable
Area
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
CUSTOMIZE_GROUP_NAME_FIELD_DISABLED
Constant for 'disable customize group name field'.
|
static int |
CUSTOMIZE_GROUP_NAME_FIELD_ENABLED
Constant for 'enable customize group name field' and choose from existing field.
|
static int |
CUSTOMIZE_GROUP_NAME_FIELD_ENABLED_WITH_FM
Constant for 'enable customize group name field' and use a formula as group name.
|
static int |
PRINT_ALWAYS_IF_NO
Constant for 'section will be printed always if no'.
|
static int |
PRINT_ALWAYS_IF_YES
Constant for 'section will be printed always if yes'.
|
static int |
PRINT_FOR_EACH_AMPM
Constant for 'section will be printed for each am/pm'.
|
static int |
PRINT_FOR_EACH_DAY
Constant for 'section will be printed for each day'.
|
static int |
PRINT_FOR_EACH_HALF_MONTH
Constant for 'section will be printed for each half month'.
|
static int |
PRINT_FOR_EACH_HALF_YEAR
Constant for 'section will be printed for each half year'.
|
static int |
PRINT_FOR_EACH_HOUR
Constant for 'section will be printed for each hour'.
|
static int |
PRINT_FOR_EACH_MINUTE
Constant for 'section will be printed for each minute'.
|
static int |
PRINT_FOR_EACH_MONTH
Constant for 'section will be printed for each month'.
|
static int |
PRINT_FOR_EACH_QUAURTER
Constant for 'section will be printed for each quarter'.
|
static int |
PRINT_FOR_EACH_SECOND
Constant for 'section will be printed for each second'.
|
static int |
PRINT_FOR_EACH_TWO_WEEKS
Constant for 'section will be printed for each two weeks'.
|
static int |
PRINT_FOR_EACH_WEEK
Constant for 'section will be printed for each week'.
|
static int |
PRINT_FOR_EACH_YEAR
Constant for 'section will be printed for each year'.
|
static int |
PRINT_IF_NEXT_VALUE_IS_NO
Constant for 'section will be printed if next value is no'.
|
static int |
PRINT_IF_NEXT_VALUE_IS_YES
Constant for 'section will be printed if next value is yes'.
|
static int |
PRINT_ON_EACH_CHANGE
Constant for 'section will be printed on each change'.
|
static int |
PRINT_ON_EACH_CHANGE_TO_NO
Constant for 'section will be printed on each change to no'.
|
static int |
PRINT_ON_EACH_CHANGE_TO_YES
Constant for 'section will be printed on each change to yes'.
|
static int |
SORT_ASCENDING_ORDER
Constant for ascending order sort direction.
|
static int |
SORT_ASCENDING_ORDER_ALPHA_NUMERIC
Constant for ascending order sort direction, numeric parts will be sorted by their number value rather than alphabetical.
|
static int |
SORT_DESCENDING_ORDER
Constant for descending order sort direction.
|
static int |
SORT_DESCENDING_ORDER_ALPHA_NUMERIC
Constant for descending order sort direction, numeric parts will be sorted by their number value rather than alphabetical
|
static int |
SORT_ORIGINAL_ORDER
Constant for original order sort direction.
|
static int |
SORT_ORIGINAL_ORDER_2
Constant for really original order sort direction.
|
static int |
SORT_SPECIFIED_ORDER
Constant for specified order sort direction.
|
static int |
SORT_SUMMARY_ORDER
Constant for sort by summaries order sort direction.
|
Modifier and Type | Method and Description |
---|---|
BySummaryOrder |
getBySummaryOrder()
Returns the BySummary sorting order for this group
BySummary sorting allows you to sort the groups by our values of aggregate function.
|
int |
getCustomizeGroupNameField()
Returns the kind of the customization of the group name field.
|
Field |
getField()
Gets the field definition element.
|
Area |
getFooter()
Returns the group footer area.
|
FormulaField |
getGroupDirectionFormula()
Returns the formula of sort direction for this group.
|
DatabaseField |
getGroupNameDbField()
Returns the database field which specify the name of the group.
|
GroupField |
getGroupNameField()
Returns the group name field of this group.
|
FormulaField |
getGroupNameFormula()
Returns the formula which specify the name of the group.
|
Area |
getHeader()
Returns the group header area.
|
boolean |
getHierarchicalGrouping()
Returns if the property 'hierarchical grouping' is enabled or disabled.
|
int |
getIndentation()
Returns the depth of the indentation of the data groups.
|
int |
getKeepTogether()
Returns the number of records that are kept together in this group.
|
Field |
getParentField()
Returns the reference field for grouping of the instanceId field.
|
boolean |
getRepeatGroupHeader()
Use this property to specify whether the group should be repeated on each new page (
true )
or not (false ). |
boolean |
getRepeatGroupHeaderWithinFooter()
Get the RepeatGroupHeaderWithinFooter flag.
|
int |
getSectionWillBePrinted()
Returns for what kind of values the group section should be printed, i.e.
|
int |
getSort()
The Method
getSort returns the type of sorting of the data of this group. |
SpecifiedOrder |
getSpecifiedOrder()
Returns the specified sorting order for this group.
|
int |
indexOf()
Returns the position of this group in report group set.
|
boolean |
isGroup()
Returns
true if this group is a GroupAreaPair and false if this group
is a Detail-, Page- or ReportAreaPair. |
void |
setBySummaryOrder(BySummaryOrder order)
Set BySummary sorting order for this group.
|
void |
setCustomizeGroupNameField(int value)
Use this property to customize the group name field.
|
void |
setField(Field newField)
Sets the field definition element.
|
void |
setGroupDirectionFormula(FormulaField formula)
Sets the formula of sort direction of current group.
|
void |
setGroupNameDbField(DatabaseField dbField)
If property 'customize groupname field' is set to CUSTOMIZE_GROUP_NAME_FIELD_ENABLED
a databasefield is needed for rendering.
|
void |
setGroupNameFormula(FormulaField fm)
If property 'customize groupname field' is set to CUSTOMIZE_GROUP_NAME_FIELD_ENABLED_WITH_FM
a formula is needed for rendering.
|
void |
setHierarchicalGrouping(boolean enabled,
Field parentField,
int indentation)
Enable or disable the property 'hierarchical grouping' with this method.
|
void |
setIndentation(int indentation)
Sets the depth of the indentation of the data groups.
|
void |
setKeepTogether(int keepGroupTogether)
Use this property to specify the number of records to keep together in this group.
|
void |
setRepeatGroupHeader(boolean value)
Use this property to specify whether the group should be repeated on each new page (
true )
or not (false ). |
void |
setRepeatGroupHeaderWithinFooter(boolean value)
Repeat the group header on a new page even when the group display is currently in its footer.
|
void |
setSectionWillBePrinted(int value)
Use this property to specify for what kind of values the group section should be printed, i.e.
|
void |
setSort(int sortType)
The Method
setSort sets the type of sorting of the data in this group. |
void |
setSpecifiedOrder(SpecifiedOrder order)
Set specified sorting order for this group.
|
java.lang.String |
toString()
Returns a string representation of this Group.
|
isDOMParser, parseDOM, parseElement, parseEndElement, parseText
public static final int SORT_ASCENDING_ORDER
public static final int SORT_DESCENDING_ORDER
public static final int SORT_ORIGINAL_ORDER
public static final int SORT_SPECIFIED_ORDER
public static final int SORT_SUMMARY_ORDER
public static final int SORT_ORIGINAL_ORDER_2
public static final int SORT_ASCENDING_ORDER_ALPHA_NUMERIC
public static final int SORT_DESCENDING_ORDER_ALPHA_NUMERIC
public static final int PRINT_FOR_EACH_DAY
public static final int PRINT_FOR_EACH_WEEK
public static final int PRINT_FOR_EACH_TWO_WEEKS
public static final int PRINT_FOR_EACH_HALF_MONTH
public static final int PRINT_FOR_EACH_MONTH
public static final int PRINT_FOR_EACH_QUAURTER
public static final int PRINT_FOR_EACH_HALF_YEAR
public static final int PRINT_FOR_EACH_YEAR
public static final int PRINT_FOR_EACH_SECOND
public static final int PRINT_FOR_EACH_MINUTE
public static final int PRINT_FOR_EACH_HOUR
public static final int PRINT_FOR_EACH_AMPM
public static final int PRINT_ON_EACH_CHANGE
public static final int PRINT_ON_EACH_CHANGE_TO_YES
public static final int PRINT_ON_EACH_CHANGE_TO_NO
public static final int PRINT_ALWAYS_IF_YES
public static final int PRINT_ALWAYS_IF_NO
public static final int PRINT_IF_NEXT_VALUE_IS_YES
public static final int PRINT_IF_NEXT_VALUE_IS_NO
public static final int CUSTOMIZE_GROUP_NAME_FIELD_DISABLED
public static final int CUSTOMIZE_GROUP_NAME_FIELD_ENABLED
public static final int CUSTOMIZE_GROUP_NAME_FIELD_ENABLED_WITH_FM
public java.lang.String toString()
String
will contain the type of this group, the sort order and group field name.toString
in class java.lang.Object
String
representation of this Group.public Area getHeader()
Area
public Area getFooter()
Area
public void setSort(int sortType)
setSort
sets the type of sorting of the data in this group.sortType
- The new value of the property sort type.java.lang.IllegalArgumentException
- will thrown if sort type is unknown.SORT_ASCENDING_ORDER
,
SORT_DESCENDING_ORDER
,
SORT_ORIGINAL_ORDER
,
SORT_ORIGINAL_ORDER_2
,
SORT_SPECIFIED_ORDER
,
SORT_SUMMARY_ORDER
,
SORT_ASCENDING_ORDER_ALPHA_NUMERIC
,
SORT_DESCENDING_ORDER_ALPHA_NUMERIC
public void setGroupDirectionFormula(FormulaField formula) throws ReportException
formula
- for sort direction or null
to remove the sort direction formula.ReportException
- Wrong formula, formula type or return value of formulagetGroupDirectionFormula()
public FormulaField getGroupDirectionFormula()
setGroupDirectionFormula(FormulaField formula)
public int getSort()
getSort
returns the type of sorting of the data of this group.SORT_ASCENDING_ORDER
,
SORT_DESCENDING_ORDER
,
SORT_ORIGINAL_ORDER
,
SORT_ORIGINAL_ORDER_2
,
SORT_SPECIFIED_ORDER
,
SORT_SUMMARY_ORDER
,
SORT_ASCENDING_ORDER_ALPHA_NUMERIC
,
SORT_DESCENDING_ORDER_ALPHA_NUMERIC
public Field getField()
Field
The current value of the 'field' property.public void setField(Field newField)
newField
- The new field element of the property 'field'.java.lang.IllegalArgumentException
- is thrown when newField is null.public void setKeepTogether(int keepGroupTogether)
keepGroupTogether
- The number of record to keep together in this group. Use the value '-1' to keep all
records of this group together.getKeepTogether()
public int getKeepTogether()
setKeepTogether(int)
public void setRepeatGroupHeader(boolean value)
true
)
or not (false
).value
- The new value of the property 'repeat group header'. Set to true
if
the group header should be repeated on each new page, else set to false
.setRepeatGroupHeaderWithinFooter(boolean)
,
getRepeatGroupHeader()
public boolean getRepeatGroupHeader()
true
)
or not (false
).true
if
the group header should be repeated on each new page, else returns false
.setRepeatGroupHeader(boolean)
public void setRepeatGroupHeaderWithinFooter(boolean value)
value
- The new value of the option.setRepeatGroupHeader(boolean)
,
getRepeatGroupHeaderWithinFooter()
public boolean getRepeatGroupHeaderWithinFooter()
setRepeatGroupHeaderWithinFooter(boolean)
public void setSectionWillBePrinted(int value)
value
- The new value of the property 'section will be printed'.java.lang.IllegalArgumentException
- if value is no valid property valuePRINT_FOR_EACH_DAY
,
PRINT_FOR_EACH_WEEK
,
PRINT_FOR_EACH_TWO_WEEKS
,
PRINT_FOR_EACH_HALF_MONTH
,
PRINT_FOR_EACH_MONTH
,
PRINT_FOR_EACH_QUAURTER
,
PRINT_FOR_EACH_HALF_YEAR
,
PRINT_FOR_EACH_YEAR
,
PRINT_FOR_EACH_SECOND
,
PRINT_FOR_EACH_MINUTE
,
PRINT_FOR_EACH_HOUR
,
PRINT_FOR_EACH_AMPM
,
PRINT_ON_EACH_CHANGE
,
PRINT_ON_EACH_CHANGE_TO_YES
,
PRINT_ON_EACH_CHANGE_TO_NO
,
PRINT_ALWAYS_IF_YES
,
PRINT_ALWAYS_IF_NO
,
PRINT_IF_NEXT_VALUE_IS_YES
,
PRINT_IF_NEXT_VALUE_IS_NO
,
getSectionWillBePrinted()
public int getSectionWillBePrinted()
PRINT_FOR_EACH_DAY
,
PRINT_FOR_EACH_WEEK
,
PRINT_FOR_EACH_TWO_WEEKS
,
PRINT_FOR_EACH_HALF_MONTH
,
PRINT_FOR_EACH_MONTH
,
PRINT_FOR_EACH_QUAURTER
,
PRINT_FOR_EACH_HALF_YEAR
,
PRINT_FOR_EACH_YEAR
,
PRINT_FOR_EACH_SECOND
,
PRINT_FOR_EACH_MINUTE
,
PRINT_FOR_EACH_HOUR
,
PRINT_FOR_EACH_AMPM
,
PRINT_ON_EACH_CHANGE
,
PRINT_ON_EACH_CHANGE_TO_YES
,
PRINT_ON_EACH_CHANGE_TO_NO
,
PRINT_ALWAYS_IF_YES
,
PRINT_ALWAYS_IF_NO
,
PRINT_IF_NEXT_VALUE_IS_YES
,
PRINT_IF_NEXT_VALUE_IS_NO
,
setSectionWillBePrinted(int)
public void setCustomizeGroupNameField(int value)
null
.value
- The new value of the property.java.lang.IllegalArgumentException
- if value is no valid property valueCUSTOMIZE_GROUP_NAME_FIELD_DISABLED
,
CUSTOMIZE_GROUP_NAME_FIELD_ENABLED
,
CUSTOMIZE_GROUP_NAME_FIELD_ENABLED_WITH_FM
,
getCustomizeGroupNameField()
,
getGroupNameFormula()
,
setCustomizeGroupNameField(int)
,
setGroupNameFormula(com.inet.report.FormulaField)
public int getCustomizeGroupNameField()
CUSTOMIZE_GROUP_NAME_FIELD_DISABLED
,
CUSTOMIZE_GROUP_NAME_FIELD_ENABLED
,
CUSTOMIZE_GROUP_NAME_FIELD_ENABLED_WITH_FM
,
setCustomizeGroupNameField(int)
,
setGroupNameFormula(com.inet.report.FormulaField)
public void setGroupNameFormula(FormulaField fm)
fm
- The formula field which specify the name of the group.CUSTOMIZE_GROUP_NAME_FIELD_ENABLED_WITH_FM
,
setCustomizeGroupNameField(int)
,
Engine.addGroup(Field)
,
Engine.removeGroup(Group)
,
Engine.getGroup(int)
,
Engine.getGroupCount()
public FormulaField getGroupNameFormula()
getCustomizeGroupNameField()
public void setGroupNameDbField(DatabaseField dbField)
dbField
- The database field which specify the name of the groupCUSTOMIZE_GROUP_NAME_FIELD_ENABLED
,
setCustomizeGroupNameField(int)
public DatabaseField getGroupNameDbField()
getCustomizeGroupNameField()
public void setHierarchicalGrouping(boolean enabled, Field parentField, int indentation) throws ReportException
parentField
and indentation
for individual arrangement
of the hierarchy.enabled
- true
if hierarchical grouping should be enabled, else false
.parentField
- The field which should be the reference for grouping of this group. Note that
the field of this group and parantId field should have the same type. The value is ignored if parameter enabled
is false
.indentation
- The depth of the indent of groups of data in twips. The value is ignored if parameter enabled
is false
.ReportException
- if parent field is null or the field of this group and parent field not on the same type.public boolean getHierarchicalGrouping()
public void setIndentation(int indentation)
indentation
- The depth of the indent of groups of data in twips.java.lang.IllegalArgumentException
- if indentation is negativepublic int getIndentation()
public Field getParentField()
public boolean isGroup()
true
if this group is a GroupAreaPair and false
if this group
is a Detail-, Page- or ReportAreaPair.public int indexOf()
public GroupField getGroupNameField()
FieldElement
to display the group name.public SpecifiedOrder getSpecifiedOrder()
SpecifiedOrder
public void setSpecifiedOrder(SpecifiedOrder order)
order
- is SpecifiedOrder Object contains the grouping conditions for this group.SpecifiedOrder
public BySummaryOrder getBySummaryOrder()
BySummaryOrder
public void setBySummaryOrder(BySummaryOrder order)
order
- is BySummaryOrder Object contains SummaryField of aggregate function and sort direction.BySummaryOrder
Copyright © 1999-2020 by i-net software GmbH