当前位置: 动力学知识库 > 问答 > 编程问答 >

How can I generate paginated bar chart in jasper report

问题描述:

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

网友答案:

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

分享给朋友:
您可能感兴趣的文章:
随机阅读: