Jump to content

Error Evaluating expression: SourceText $V{Week 1}


camnott

Recommended Posts

I have a variable to sum ETC's.

It pulls in etc's by resource by investment. 

When I try to run the preview, I get this error : Reason: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source Text $V{Week 1}

 

Basically, my SQL is doing a sum on the timeslice for each resource/investment/role. This works flawlessly in SQL Server Management Studio, but when trying to sum in Jaspersoft, it does not group the investments.

I tried creating the variables as such :

Week 1

java.math.BigDecimal

Sum

$F{Week 1}

0

Group 1

Group 1

 

Here is a copy of some of the code :

 

<variable name="Week 1" class="java.math.BigDecimal" resetType="Group" resetGroup="Group1" incrementType="Group" incrementGroup="Group1" calculation="Sum">
        <variableExpression><![CDATA[$F{Week 1}]]></variableExpression>
        <initialValueExpression><![CDATA[0]]></initialValueExpression>
    </variable>

 

<textField>
                        <reportElement x="671" y="1" width="48" height="21" uuid="adc5d99a-2d2a-4205-9a75-3c7d2042367e"/>
                        <textFieldExpression><![CDATA[$V{Week 1}]]></textFieldExpression>
                    </textField>

 

Any Idea's?

Link to comment
Share on other sites

  • Replies 3
  • 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...