How can I generate paginated bar chart in jasper report

拟墨画扇 提交于 2019-12-12 04:38:32

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/15339325/how-can-i-generate-paginated-bar-chart-in-jasper-report

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!