如何在jasper报告中生成分页条形图

时间:2013-03-11 13:04:29

标签: jasper-reports bar-chart

我想要的是,第一页上某些x没有记录的条形图然后是下一页上的下一个x记录,依此类推。 我搜索了很多,但没有找到确切的解决方案。甚至可以使用Jasper Reports

1 个答案:

答案 0 :(得分:2)

您可以使用报告组执行此操作。

在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.

见图表

enter image description here