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

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

public final class PwFormatDate
extends AbstractAccpacFormulaFunction

PwFormatDate (in the C version the "pw" is lower-case) converts a Sage ERP Accpac date stored as a YYYYMMDD integer into a Crystal Reports date object.

The Crystal arguments to this function are:

  1. The YYYYMMDD integer date to convert

A null date (represented by 0) is converted to the Crystal Reports date object that has the special internal value of DateValue.nullCRDate. This is similar to the behavior of the C UFL. Any other invalid date causes an IllegalArgumentException. This differs from the behavior of the C UFL in that we now have the ability to throw an exception instead of just quietly switching the invalid date to a null date (which is the behavior of Crystal's CRYearMonthDayToDate, which was called by the C UFL).


Constructor Summary
PwFormatDate()
           
 
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

PwFormatDate

public PwFormatDate()
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.