Jump to content
We've recently updated our Privacy Statement, available here ×

Jasperserver error on xml working on iReport


sbced

Recommended Posts

I'm using Jasperserver 3.7.1 and iReport 4.0.0

On IReport I've 2 fields

    <field name="RBA" class="java.math.BigDecimal"/>
    <field name="MAV" class="java.math.BigDecimal"/>
 

and I'm trying to display a field with the sum

            <textField pattern="#,##0;-#,##0">
                <reportElement x="99" y="638" width="68" height="20"/>
                <box rightPadding="3">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.0"/>
                    <leftPen lineWidth="0.0"/>
                    <bottomPen lineWidth="0.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Right" verticalAlignment="Middle">
                    <font size="7"/>
                </textElement>
                <textFieldExpression class="java.lang.Double"><![CDATA[$F{RBA}.doubleValue()+$F{MAV}.doubleValue()]]></textFieldExpression>
            </textField>
 

On iReport I can compile and preview: all ok.

But on Jaspersever called via browser

http://xxxxx:8080/jasperserver/flow.html?_flowId=viewReportFlow&reportUnit=/reports/Apex/SK_CLIENTE_FG&output=pdf

I've he error:


Error Trace:  
com.jaspersoft.jasperserver.api.JSExceptionWrapper: Errors were encountered when compiling report expressions class file: 1. Cannot cast from double to Double value = (java.lang.Double)(((java.math.BigDecimal)field_RBA.getValue()).doubleValue()+((java.math.BigDecimal)field_MAV.getValue()).doubleValue()); //$JR_EXPR_ID=88$ <---------------------------------------------------------------------------------------------------------------------------------------> 2. Cannot cast from double to Double value = (java.lang.Double)(((java.math.BigDecimal)field_RBA.getOldValue()).doubleValue()+((java.math.BigDecimal)field_MAV.getOldValue()).doubleValue()); //$JR_EXPR_ID=88$ <---------------------------------------------------------------------------------------------------------------------------------------------> 3. Cannot cast from double to Double value = (java.lang.Double)(((java.math.BigDecimal)field_RBA.getValue()).doubleValue()+((java.math.BigDecimal)field_MAV.getValue()).doubleValue()); //$JR_EXPR_ID=88$ <---------------------------------------------------------------------------------------------------------------------------------------> 
 

Suggestions?

 

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

The simple solution is: don't use JasperServer 3.7.1 and iReport 4.0.0.

They are not compatible. JR is generally very good at being backwards compatible. But it's not "forwards compatible". Use iReport 3.7 with JasperServer 3.7, and things should all be good.

Regards,
Matt

Link to comment
Share on other sites

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...