|
||||||||||
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.RemoveLeadZero
public final class RemoveLeadZero
We recommend that reports avoid using RemoveLeadZero. An analysis of Sage ERP Accpac's own reports show that only 10 existing reports use RemoveLeadZero, but some of those reports (like GL posting journal reports) are regularly customized. The only reason RemoveLeadZero is being ported is so that those customized reports won't have to change.
The "RemoveLeadZero" name is misleading (but we must keep that name for backward compatibility). Based on an analysis of the C UFL code, this formula removes leading zeros, including those that are preceded solely by non-digits (such as the negative sign and whitespace). If there are no leading zeros, the string is returned as-is. If the string only contains zeros, the empty string is returned.
The Crystal arguments to this function are:
The following are examples of this function's behavior:
Input | Output |
---|---|
"000" | "" |
"000100" | "100" |
" - 00" | " - " |
"abc0010234def50" | "abc10234def50" |
"100" | "100" |
"-10200" | "-10200" |
"abc" | "abc" |
"" | "" |
Constructor Summary | |
---|---|
RemoveLeadZero()
|
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 RemoveLeadZero()
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 |