Report generates multiple pages

0

Hello,

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 months 3 weeks ago

3 Answers:

1

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.

https://community.jaspersoft.com/wiki/creating-charts-and-datasets-jaspersoft-studio

hozawa's picture
44229
Joined: Apr 24 2010 - 4:31pm
Last seen: 1 month 1 week ago
0
tchen's picture
41335
Joined: Feb 27 2008 - 7:33am
Last seen: 12 hours 35 min ago
0

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 months 3 weeks ago
Feedback
randomness