com.sage.accpac.sm.crystal.ufl
Class IsTrue

java.lang.Object
  extended by com.sage.accpac.sm.crystal.ufl.AbstractAccpacFormulaFunction
      extended by com.sage.accpac.sm.crystal.ufl.IsTrue
All Implemented Interfaces:
com.crystaldecisions.reports.formulas.FormulaFunction, com.crystaldecisions.reports.formulas.FormulaFunctionDefinition

public final class IsTrue
extends AbstractAccpacFormulaFunction

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:

  1. The string to test

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

IsTrue

public IsTrue()
Method Detail

getIdentifier

public java.lang.String getIdentifier()


getReturnType

public com.crystaldecisions.reports.common.value.FormulaValueType getReturnType()


getArguments

public com.crystaldecisions.reports.formulas.FormulaFunctionArgumentDefinition[] getArguments()


evaluate

public com.crystaldecisions.reports.common.value.FormulaValue evaluate(com.crystaldecisions.reports.formulas.FormulaValueReference[] arguments)
                                                                throws com.crystaldecisions.reports.formulas.FormulaFunctionCallException

Throws:
com.crystaldecisions.reports.formulas.FormulaFunctionCallException


Copyright © 2011 Sage Software, Inc. All rights reserved.