Report generates multiple pages


I am working on a project where we are using jasper reports for displaying charts and tables. I am having this issue when I generate report in JasperStudio multiple pages are generated for one report.

For example I want to display query results as Chart. I have no issues with generating the chart, but whenever I run the report it always generates multiple pages. In fact report is generated on number of pages how many rows query returns. 

If query retunrs 3 rows, 3 pages are generated with the same chart. If  query retunrs 10 rows, 10 pages are generated and so on. Having this issue causing another issue when I want to add crosstab in the report. So when I try to add crosstab for the sam query, corss tab is displayed across all the pages, but for each page one colum of the crosstab is displayed. 

For example. I have following result.

total avg month
23 3 June
73 3 July
22 12 August
43 2 September

If I try to display such a data set using chart and crosstab it will generate 4 pages. On each page chart will be same, but for the crosstab each column will be displayed in separeta page. 

Any suggestions what is causing this issue? 


kde.chris's picture
Joined: Sep 1 2018 - 6:46am
Last seen: 4 years 3 months ago

3 Answers:

This usually happens when a chart is placed in the detail band and using the main dataset.

Try placing the chart in the summary band and creating a subdataset. Check the following tutorial.

hozawa's picture
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 12 months ago
tchen's picture
Joined: Feb 27 2008 - 7:33am
Last seen: 19 min 15 sec ago

Placing the chart in summary band does the trick. Thanks for your help.

kde.chris's picture
Joined: Sep 1 2018 - 6:46am
Last seen: 4 years 3 months ago