Jump to content
Changes to the Jaspersoft community edition download ×

Double Expression result displaying as null


peanut69

Recommended Posts

Any help on this would be greatly appreciated:

 

Have two exressions displaying on report, both setup identical. They are displaying differing results. Compared XML between them and have the following:

-----------------------------------------------------

<variable name="numerator" class="java.lang.Double" resetType="Group" resetGroup="By_EMP" calculation="Nothing">

<variableExpression><![CDATA[new Double(

$V{By_EMP_REG_HRS}.doubleValue()==0

? 0.00

: (($V{By_EMP_PAID_ABS_HRS}.doubleValue()-$V{By_EMP_STAT_HOL_HRS}.doubleValue()-$V{By_EMP_VAC_HRS}.doubleValue())

/ $V{By_EMP_REG_HRS}.doubleValue())*100.00

)]]></variableExpression>

</variable>

 

-----------------------------------------------------

<variable name="By_EMP_STD_ABS_PC" class="java.lang.Double" resetType="Group" resetGroup="By_EMP" calculation="Nothing">

<variableExpression><![CDATA[new Double(

$V{By_EMP_REG_HRS}.doubleValue()==0

? 0.00

: (($V{By_EMP_PAID_ABS_HRS}.doubleValue()-$V{By_EMP_STAT_HOL_HRS}.doubleValue()-$V{By_EMP_VAC_HRS}.doubleValue())

/ $V{By_EMP_REG_HRS}.doubleValue())*100.00

)]]></variableExpression>

</variable>

 

-----------------------------------------------------

 

the second one is producing the word NULL or 100% whereas the first one produces the correct results.

 

Any thoughts?

Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...