Class Trigger

  • All Implemented Interfaces:
    java.io.Serializable

    public class Trigger
    extends java.lang.Object
    implements java.io.Serializable
    A trigger is a runtime value that will be evaluated at runtime and can be accessed after a report has rendered. The state of the trigger will not be saved with the rpt file. Sample usage:
    
          Fields fields = eng.getFields();
          FormulaField formula = fields.addFormulaField( "trigger", "23 >= 24", FormulaField.FORMULA_PROPERTY );
          Trigger trigger = eng.getTrigger();
          trigger.setFormula( formula );
          eng.execute();                      //render the report
          eng.getPageCount();                 //wait until finish
          Boolean value = trigger.getValue(); //request the trigger value
     
    Since:
    11.1
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      FormulaField getFormula()
      Get the formula of this trigger.
      java.lang.Object getResult()
      The result of the trigger formula.
      java.lang.Boolean getValue()
      The value of the trigger.
      void setFormula​(FormulaField formula)
      Set the formula of the trigger.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setFormula

        public void setFormula​(FormulaField formula)
        Set the formula of the trigger. This formula will be evaluated from the runtime once the report is finished rendering. Note that this is run-time only: This value will not be saved with the report template.
        Parameters:
        formula - a new formula
        Since:
        11.1
        See Also:
        getFormula()
      • getValue

        public java.lang.Boolean getValue()
        The value of the trigger. The value will be null if the report rendering was not finished.
        Returns:
        the value or null
        Since:
        11.1
      • getResult

        public java.lang.Object getResult()
        The result of the trigger formula. The value will be null if the report rendering was not finished.
        Returns:
        the value or null
        Since:
        14.1