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

Dependent Variables in group footer


ILdar Valeev
Go to solution Solved by Ankur Gupta,

Recommended Posts

I have two integer data colums and their summ calculated for groups like that:

<variable name="dept_COLUMN_A_SUM" class="java.lang.Integer" resetType="Group" resetGroup="DEPT_GROUP" calculation="Sum">    <variableExpression>        <![CDATA[$F{COLUMN_A}]]>    </variableExpression></variable>

I want to add third column with percentage of ColumnA in Column B:
  ColumnC = ColumnA / Column B * 100%
 
How can i calculate percentage for the group footer?   dept_COLUMN_A_SUM / dept_COLUMN_B_SUM * 100
Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

Hi ildar,

You can simply put  a field with the expression  dept_COLUMN_A_SUM / dept_COLUMN_B_SUM * 100  in the group footer , and you would get the result.And yes do crosscheck the type of the textfield which contains the expression , it should be same as the type used for the variables.

 

I hope for the variables  dept_COLUMN_A_SUM  and  dept_COLUMN_B_SUM you have set the reset types as the group concerned 

Hope that it helps

Thanks,

Ankur Gupta

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