Class TotalCalculationFunction

  • All Implemented Interfaces:
    Serializable, Cloneable, EventListener, ReportListener, Expression, Function

    public class TotalCalculationFunction
    extends AbstractFunction
    A report function that stores the result of a calculation for a group or the complete report. This function can be used to convert simple running-functions into total-functions by wrapping them up. The wrapped up function will be evaluated as usual and the result at the end of the report and/or end of the group will be stored in the TotalCalculationFunction.
    Author:
    Thomas Morgner
    See Also:
    Serialized Form
    • Constructor Detail

      • TotalCalculationFunction

        public TotalCalculationFunction()
        Constructs a new function.

        Initially the function has no name...be sure to assign one before using the function.

    • Method Detail

      • getGroup

        public String getGroup()
        Returns the name of the group to be totalled.
        Returns:
        the group name.
      • setGroup

        public void setGroup​(String group)
        Defines the name of the group to be totalled. If the name is null, all groups are totalled.
        Parameters:
        group - the group name.
      • getField

        public String getField()
        Returns the field used by the function. The field name corresponds to a column name in the report's data-row.
        Returns:
        The field name.
      • setField

        public void setField​(String field)
        Sets the field name for the function. The field name corresponds to a column name in the report's data-row.
        Parameters:
        field - the field name.
      • getValue

        public Object getValue()
        Return the current expression value.

        The value depends (obviously) on the expression implementation.

        Returns:
        the value of the function.
      • getCrosstabFilterGroup

        public String getCrosstabFilterGroup()
      • setCrosstabFilterGroup

        public void setCrosstabFilterGroup​(String crosstabFilterGroup)