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

Subtracting between column groups in crosstab


mortoza

Recommended Posts

Hello all

I am preparing a salary sheet report where I have put all earnings under 1st column group and deductions under 2nd column group. Crosstab is automatically summing up the column groups as well as grand total i.e. sum of column group 1 and 2. Actually I need Subtraction of column group 2 total from column group 1 total. Can anyone help how to do this?

 

Mortoza

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

AFAIK you can't do it within a crosstab context.

 

 

You would need to set up a subreport that simply calculates those two values and returns them for you to manipulate in whatever way you want.

 

 

If you need to display the values and the result of the subtraction as if they were part of the crosstab then you would use the crosstab editor to delete the total fields that you want to replace and then put Text Fields directly under the crosstab to display things as you need.

 

 

.

Post edited by: jmurray, at: 2007/01/06 10:35

Link to comment
Share on other sites

  • 3 months later...

Hi,

It doesn't work.

 

Is it really not possible subtracting one column group total from another column group total in Jasperreport?

 

Example:

1) Earnings group: Basic salary, House rent, Bonus

2) Deductions group: Tax, Loan

I want to calculate net salary i.e. 1-2=Net.

 

Help from anybody would be really appreciated.

 

Rgds,

Mortoza

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