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

How to sum an Field


nitin403

Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

You can add a variable using a field as expression and setting the calculation type as SUM.

 

Sample:

 

<variable name="VARIABLE_SAMPLE" class="java.lang.String" resetType="Report" calculation="Sum">

<variableExpression><![CDATA[$F{FIELD_NAME}]]></variableExpression>

</variable>

 

Try iReport if you are not using it yet.

 

HTH

Link to comment
Share on other sites

Hi fabismt!

Thanks a lot

I am using iReport.

But I don't know how to create variables and how to use them.

I am a bit confused:blink: about using variables.

What I want to do is get the summation of a field.

The field has a Double value.

And in the columnFooter I want to show the sum of that Field.

Thanks a lot once again.

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