Do anyone have hints, if I want to create crosstab columns from array, then insert the correction information into the crosstab?
For example, I have a table like below in my DB:
customer ---- activity_date ---- activity|
customer1 ---- 01-01-2016 ---- A|
customer1 ---- 01-03-2016 ---- B|
customer2 ---- 01-01-2016 ---- A|
When users request report from JAN 16 to MAR 16, the report should be shown like below:
customer ---- 01-2016 ---- 02-2016 ---- 03-2016 |
customer1 ---- Activity count: 1 ---- Activity count:0 ---- Activity count:1
customer2 ---- Activity count:1 ---- Activity count:0 ---- Activity count:0
total ---- Activity sum:2 ---- Activity sum:0 ---- Activity count:1
The current problem is that, as there is no data within Feb 2016, the column 02-2016 is missing in the report.
Is there any way (like scriptlet) to create an array as column, then tell the JasperReport the insert correct data when activity_date == column_date?
I'm using Jaspersoft Studio.