com.crystaldecisions.sdk.occa.report.data
Interface IFormula

All Superinterfaces:
IClone
All Known Subinterfaces:
IConditionFormula, ICustomFunction, IDataConditionFormula, IDataSourceParameterFormula, IFilter, IFormulaField
All Known Implementing Classes:
ConditionFormula, CustomFunction, DataConditionFormula, DataSourceParameterFormula, Filter, Formula, FormulaField

public interface IFormula
extends IClone

This interface defines a formula and allows you modify the formula text, its syntax type, and its treatment of null values.

See Also:
IReportClientDocument.checkFormula(IFormula)

Method Summary
 FormulaNullTreatment getFormulaNullTreatment()
          Returns how to treat null values in the evaluation of a formula.
 FormulaSyntax getSyntax()
          Returns the syntax used to write the formula.
 java.lang.String getText()
          Returns the formula string.
 void setFormulaNullTreatment(FormulaNullTreatment treatment)
          Sets how to treat null values in the evaluation of a formula.
 void setSyntax(FormulaSyntax syntax)
          Sets the syntax used to write the formula.
 void setText(java.lang.String text)
          Sets the formula string.
 

Method Detail

getFormulaNullTreatment

FormulaNullTreatment getFormulaNullTreatment()

Returns how to treat null values in the evaluation of a formula.

By default, null values are treated as exceptions, which means that as soon as RAS encounters a null valued field in a formula, it immediately stops evaluating the formula and produces no value.

If you want to handle null field values in your formula, you must explicitly do so by adding a test function such as IsNull(). You also have the option to treat nulls as default values. The following are the default values for different types used in a formula.

Returns:
The FormulaNullTreatment object that specifies how to treat null values in the evaluation of a formula.

getSyntax

FormulaSyntax getSyntax()

Returns the syntax used to write the formula.

Returns:
The FormulaSyntax object.

getText

java.lang.String getText()

Returns the formula string.

Returns:
The formula as a String.

setFormulaNullTreatment

void setFormulaNullTreatment(FormulaNullTreatment treatment)

Sets how to treat null values in the evaluation of a formula.

By default, null values are treated as exceptions, which means that as soon as RAS encounters a null valued field in a formula, it immediately stops evaluating the formula and produces no value.

If you want to handle null field values in your formula, you must explicitly do so by adding a test function such as IsNull(). You also have the option to treat nulls as default values. The following are the default values for different types used in a formula.

Parameters:
treatment - The FormulaNullTreatment object that specifies how to treat null values in the evaluation of a formula.

setSyntax

void setSyntax(FormulaSyntax syntax)

Sets the syntax used to write the formula.

Parameters:
syntax - The FormulaSyntax object.

setText

void setText(java.lang.String text)

Sets the formula string.

Parameters:
text - The formula as a String.