I have a chart report that displaying monthly data and i want to display previous and next month data by clicking previous and next month.
How to display data in chart by clicking previous and next month.
I have a chart report that displaying monthly data and i want to display previous and next month data by clicking previous and next month.
How to display data in chart by clicking previous and next month.
Add a parameter to the report to specify the month. Create two text items in the RDL for this report for previous and next. Configure the 'jump to' item for these two tems to invoke this same report with correct value for the month deduced from the month value in the current report. It will be month - 1 for prev and month + 1 for next. In short, you will be calling the same report for both the prev, next and for the current month.
not sure what environment you are in, but you could use the following SQL to get you the next/previous months (using oracle). Use this as your starting point for building your query.
next button: select to_char(sysdate,'MM')+1 from dual
previous button: select to_char(sysdate,'MM')11 from dual
Once you get your requested month, build the remaining resultset.