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

0

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.

pathfinder2104.work's picture
Joined: Feb 27 2014 - 8:52pm
Last seen: 5 years 3 weeks ago

1 Answer:

0

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/

Ankur Gupta's picture
Joined: Jan 21 2013 - 10:36pm
Last seen: 1 year 3 months ago
Feedback
randomness