|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface for implementing classes that deal with report variables. This interface defines constants for names of built-in variables and for reset, increment and calculation types.
When declaring a report group, the engine will automatically create a count variable that will calculate the number of records that make up the current group (number of records processed between group ruptures). The name for this variable comes from the name of the group it corresponds to, suffixed with the "_COUNT" sequence. It can be used like any other report variable, in any report expression (even in the current group expression like you can see done in the "BreakGroup" of the jasper sample).
Field Summary | |
static byte |
CALCULATION_AVERAGE
The value is obtained by calculating the average for the series of values obtained by evaluating the variable's expression for each record in the data source. |
static byte |
CALCULATION_COUNT
The value is calculated by counting the non-null values of the variable expression with every iteration in the data source. |
static byte |
CALCULATION_HIGHEST
The value of the variable represents the highest in the series of values obtained by evaluating the variable's expression for each data source record. |
static byte |
CALCULATION_LOWEST
The value of the variable represents the lowest in the series of values obtained by evaluating the variable's expression for each data source record. |
static byte |
CALCULATION_NOTHING
The value is calculated by simply evaluating the variable expression. |
static byte |
CALCULATION_STANDARD_DEVIATION
The value is obtained by calculating the standard deviation for the series of values returned by evaluating the variable's expression. |
static byte |
CALCULATION_SUM
The value is calculated by summing up the values returned by the variable's expression. |
static byte |
CALCULATION_SYSTEM
The value is not calculated by JasperReports. |
static byte |
CALCULATION_VARIANCE
The value is obtained by calculating the variance for the series of values returned by evaluating the variable's expression. |
static java.lang.String |
COLUMN_COUNT
This variable contains the number of records that were processed when generating the current column. |
static java.lang.String |
COLUMN_NUMBER
Built-in variable containing the current column number. |
static java.lang.String |
PAGE_COUNT
Built-in variable containing the number of records that were processed when generating the current page. |
static java.lang.String |
PAGE_NUMBER
Built-in variable containing the current page number. |
static java.lang.String |
REPORT_COUNT
Built-in variable that contains the total number of records read from the datasource. |
static byte |
RESET_TYPE_COLUMN
The variable is reinitialized at the beginning of each new column. |
static byte |
RESET_TYPE_GROUP
The variable is reinitialized every time the group specified by the getResetGroup() method breaks. |
static byte |
RESET_TYPE_NONE
The variable will never be initialized using its initial value expression and will only contain values obtained by evaluating the variable's expression. |
static byte |
RESET_TYPE_PAGE
The variable is reinitialized at the beginning of each new page. |
static byte |
RESET_TYPE_REPORT
The variable is initialized only once, at the beginning of the report filling process, with the value returned by the variable's initial value expression. |
Method Summary | |
byte |
getCalculation()
Returns the variable calculation type. |
JRExpression |
getExpression()
Returns the main expression for this variable. |
java.lang.Class |
getIncrementerFactoryClass()
Returns the class of the incrementer factory used for choosing the right incrementer for the variable value. |
java.lang.String |
getIncrementerFactoryClassName()
Returns the string name of the variable value class. |
JRGroup |
getIncrementGroup()
Returns the group whose break triggers the variable increment. |
byte |
getIncrementType()
Returns the variable increment type. |
JRExpression |
getInitialValueExpression()
Returns the initial value expression for this variable. |
java.lang.String |
getName()
Returns the name of the variable. |
JRGroup |
getResetGroup()
Returns the group whose break triggers the variable reset. |
byte |
getResetType()
Returns the variable reset type. |
java.lang.Class |
getValueClass()
Returns the class of the variable value. |
java.lang.String |
getValueClassName()
Returns the string name of the variable value class. |
boolean |
isSystemDefined()
Returns true if the variable calculation type is system defined. |
Field Detail |
public static final java.lang.String REPORT_COUNT
public static final java.lang.String PAGE_COUNT
public static final java.lang.String COLUMN_COUNT
public static final java.lang.String PAGE_NUMBER
public static final java.lang.String COLUMN_NUMBER
public static final byte RESET_TYPE_REPORT
public static final byte RESET_TYPE_PAGE
public static final byte RESET_TYPE_COLUMN
public static final byte RESET_TYPE_GROUP
getResetGroup()
method breaks.
public static final byte RESET_TYPE_NONE
public static final byte CALCULATION_NOTHING
public static final byte CALCULATION_COUNT
public static final byte CALCULATION_SUM
public static final byte CALCULATION_AVERAGE
In order to calculate the average, the engine creates behind the scenes a helper report variable that calculates the sum of the values and uses it to calculate the average for those values. This helper sum variable gets its name from the corresponding average variable suffixed with "_SUM" sequence. This helper variable can be used in other report expressions just like any normal variable.
public static final byte CALCULATION_LOWEST
public static final byte CALCULATION_HIGHEST
public static final byte CALCULATION_STANDARD_DEVIATION
Just like for the variables that calculate the average, the engine creates and uses helper report variables for first obtaining the sum and the count that correspond to your current series of values. The name for those helper variables that are created behind the scenes is obtained by suffixing the user variable with the "_SUM" or "_COUNT" suffix and they can be used in other report expressions like any other report variable.
For variables that calculate the standard deviation, there is always a helper variable present, that first calculates the variance for the series of values and it has the "_VARIANCE" suffix added to its name.
public static final byte CALCULATION_VARIANCE
public static final byte CALCULATION_SYSTEM
Method Detail |
public java.lang.String getName()
public java.lang.Class getValueClass()
public java.lang.String getValueClassName()
public java.lang.Class getIncrementerFactoryClass()
JRIncrementer
,
JRIncrementerFactory
public java.lang.String getIncrementerFactoryClassName()
public byte getResetType()
public byte getIncrementType()
public byte getCalculation()
public boolean isSystemDefined()
true
if the variable calculation type is system defined.
CALCULATION_SYSTEM
public JRExpression getExpression()
JRExpression
instance containing the expression.public JRExpression getInitialValueExpression()
JRExpression
instance containing the initial expression.public JRGroup getResetGroup()
getResetType()
returns
RESET_TYPE_GROUP
.
public JRGroup getIncrementGroup()
getIncrementType()
returns
RESET_TYPE_GROUP
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |