How to display one group twice per page in Jasper Reports

I have a table in the first half of the page and I want to print the same table in the second half of the page.

I tried adding two detail bands but I can't put a separator between the two bands.

olyncircle's picture
Joined: May 30 2022 - 5:42pm
Last seen: 3 months 2 days ago

Is this possible for multiple pages?

olyncircle - 5 months 1 week ago

1 Answer:

You cannot display data twice unless it exists twice.

What you can do is update your dataset and UNION the results to itself.  During that process, you may want to add a hardcoded column like REC_TYPE to help you identify where the data should print.

SELECT 'top' AS REC_TYPE, field1, field2 FROM My_Table
UNION
SELECT 'bottom', field1, field2 FROM My_Table 

jgust's picture
6555
Joined: Jun 10 2010 - 6:39am
Last seen: 1 day 17 hours ago
Feedback