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

How to calculate % using the same values in row and create a third column??


Recommended Posts

Hi,

I am creating a simple report for learning jasper reports, I want to display a list of students using a "List".

Student table has three columns 1. stud_rollno 2. stud_total_marks 3. stud_math_marks I want to calculate the % of math marks out of total and create a third column in my report using a list.

The third column would be using the stud_total_marks and stud_math_marks columns. Any help?? Thank you in advance.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

You can achieve this by simply adding the third textfeild, and the expression for the field would be - 
 ((stud_math_marks/stud_total_marks ) *100)

This text feild will be the 4th column in the list and hence when the iteration is carried i.e. the list is generated so will be the percentage get generated.

Hope that this explains.

Thanks
Ankur Gupta
http://ankurthetechie.blogspot.in/

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