|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sage.accpac.sm.crystal.ufl.AbstractAccpacFormulaFunction
com.sage.accpac.sm.crystal.ufl.IsTrue
public final class IsTrue
We recommend that reports avoid using IsTrue. An analysis of Sage ERP Accpac's own reports show that only 6 existing OE reports use IsTrue, but those reports (being ones like OE invoices) are often customized. The only reason IsTrue is being ported is so that those customized reports won't have to change.
IsTrue returns true for any string is considered not a "false" string. In other words, case-insensitive "false", "f", or "0" are considered false. Everything else is considered true.
The Crystal arguments to this function are:
The 6 OE reports test the same set of numeric fields. Those fields go through an inefficient conversion to strings, which are tested by IsTrue. In one of those reports, one test uses IsTrue while another equivalent test avoids IsTrue - it simply sees if the fields are non-zero. This corrected test is in line with the C concept of 0 being false and anything else being true.
For this reason, the Java UFL will differ from the existing C UFL of the same name. (The C UFL considered case-insensitive "true", "t", or "1" to be true and everything else to be false.)
Constructor Summary | |
---|---|
IsTrue()
|
Method Summary | |
---|---|
com.crystaldecisions.reports.common.value.FormulaValue |
evaluate(com.crystaldecisions.reports.formulas.FormulaValueReference[] arguments)
|
com.crystaldecisions.reports.formulas.FormulaFunctionArgumentDefinition[] |
getArguments()
|
java.lang.String |
getIdentifier()
|
com.crystaldecisions.reports.common.value.FormulaValueType |
getReturnType()
|
Methods inherited from class com.sage.accpac.sm.crystal.ufl.AbstractAccpacFormulaFunction |
---|
getIntegerArgument, getStringArgument, validateArgumentValues |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IsTrue()
Method Detail |
---|
public java.lang.String getIdentifier()
public com.crystaldecisions.reports.common.value.FormulaValueType getReturnType()
public com.crystaldecisions.reports.formulas.FormulaFunctionArgumentDefinition[] getArguments()
public com.crystaldecisions.reports.common.value.FormulaValue evaluate(com.crystaldecisions.reports.formulas.FormulaValueReference[] arguments) throws com.crystaldecisions.reports.formulas.FormulaFunctionCallException
com.crystaldecisions.reports.formulas.FormulaFunctionCallException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |