Class Trigger

java.lang.Object
com.inet.report.Trigger
All Implemented Interfaces:
Serializable

public class Trigger extends Object implements 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:
  • Method Details

    • 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

      public FormulaField getFormula()
      Get the formula of this trigger. Will be null if not set.
      Returns:
      the formula
      Since:
      11.1
      See Also:
    • getValue

      public 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 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