jasper reports - How to create multiple chart using single query result data -
i have query returning me 40 row each row has number_of_bugs_closed , closed_date. closed_date value rage may , jun month.
now have create 3 report chart in jasperreports
- graph show number of closed bugs every day.
- graph show number of closed bugs every week.
- graph show number of closed bugs every month.
can create these 3 chart using single query result data, or have create 3 different queries?
is possible in jasper using script or other way?
i hope might use kind of date check in query.
where date between may , jun
instead create 2 parameters, $p{timecheck}
, $p{timerange}
.
in which, $p{timecheck} parameter used in query time comparison , parameter $p{timerange} used derive value of parameter $p{timecheck}. pass different $p{timerange} value different charts while mapping parameters, example, month chart $p{timerange}='month', week chart, $p{timerange}='week' , everyday chart, $p{timerange}='all'.
parameter $p{timecheck} should has following expression "$p{timerange} == 'week' ? 'date in (startdate or enddate of everyweek)' : $p{timerange} == 'month' ? 'date in (startdate or enddate of every month)' : 'date between may , jun'"
now use parameter in condition where $p!{timecheck}
note: donot use main query. try create dataset , use query.
i hope should solve question.
Comments
Post a Comment