This is the query I’m going to use
select monthNmae, monthID, achievement , target from salse
Above query returns the following result
month | monthID | achievement | target
jan 1 12 10
feb 2 56 20
mar 3 9 20
. . . .
. . . .
. . . .
. . . .
dec 12 70 68
I want a table from Jasper report like
month jan feb mar ............... Dec
Achievement 12 56 9 .............. 70
target 10 26 20 .............. 68
Any help?
You can write a query to get the data in the format that you want. In MySQL, you can use an aggregate function and a
CASEstatement:See SQL Fiddle with Demo