Hi everyone
I am new with ireport-5.6.0
My Urgent Requirement is to calculate total Male and Female from my report.
For Example
Student_Name Gender
John Male
Rekha Female
Ravi Male
output:
Total Male=2
Total Female=1
In my report i create Two Variable one for male and another for female and set
variable class=java.lang.Boolean
Calculation=Count
Reset Type=Column
Increment Type=Column
Variable Expression=$V{male}
and drag both variable in my report
when i click on preview its display null value
I am not using any sub report in my report but i add two parameter
i want to display my value in my column footer(column footer band)
I also test with my sql query
select count(*) as total
, sum( case when gender = 'male'
then 1 else 0 end ) as male
, sum( case when gender = 'female'
then 1 else 0 end ) as female
from testdb.student
where department='Computer Science '
when i test this query in my database(mysql) its worked perfectly but when i tryed this query in my ireport query box
its display wrong value
Thnaks in Advanced
Anwar