nitin403 Posted August 7, 2007 Share Posted August 7, 2007 Hi! to All.I need to get total of an Field.So How to add or sum an single field.Examples will also be very helpful.Thank you in advance. Link to comment Share on other sites More sharing options...
fabismt Posted August 7, 2007 Share Posted August 7, 2007 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 More sharing options...
nitin403 Posted August 7, 2007 Author Share Posted August 7, 2007 Hi fabismt!Thanks a lotI 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now