Reputation: 290
What i want here is, bar chart for certain x no of records on first page then next x number of records on next page and so on. I searched a lot for this, but didnt found exact solution. Is it even possible with Jasper Reports
Upvotes: 0
Views: 1356
Reputation: 3548
You can do this by using report groups.
Open your report in iReport.
1:-Open report and in Report inspector right click and select "Add Report Group"
2:-Give any name (eg. splitter) and
select "Group by the following expression" and enter
$V{REPORT_COUNT} - 1 - ( ($V{REPORT_COUNT} - 1) % 3 ).
(here 3 means 3 bars in a page)
Click next and select Add the group footer.
3:- Open palette and drag and drop a chart element from the Palette into
the report designer on the group footer band.
4:- Select Bar Chart, follow the wizard:
a:- "Reset type" = Group
b:- "Reset group" = splitter
(same name what you gave at the time of Report data set creation)
c:- add series in Details tab.
See the chart
Upvotes: 2