Report com 2 ou mais paginas

Pessoal bom dia,

Alguem poderia me ajudar na contrução de um report com mais de uma pagina, preciso fazer uma proposta comercial e não estou conseguindo fazer.

Obrigado a todos.

mariel.o.feitosa's picture
Joined: Apr 27 2019 - 4:58pm
Last seen: 1 year 3 months ago

Google Translate:

Report with 2 or more pages [edit]

Guys good morning,

Could someone help me in building a report with more than one page, I need to make a business proposal and I can not do.

Thank you all.

djohnson53 - 4 years 2 weeks ago

1 Answer:

Where is the problem - don't understand what the real problem is? If you create a query from a database let's say SELECT id, date, customerno FROM orders  

and you place each field $F{id}, $F{date} and $F{customerno} into the DETAIL BAND of your jrxmal, then the report will render per record one detail. Let's say 20 records will fit to one page and you have 100 records.... well then 5 pages will be rendered! So this is normal JasperReports is working.

If you need some static stuff you can use several "DummyGroupsBands" (a group without any expression)... there it is possible to define x-GroupHeaderBands that are let's say 802 pixel in height (so A4 = 842  - 2x20px for top/bottom margins) there you could place some static stuff independently of your query results. So assume you need 2 full sized pages you could create to groupheader bands (each 802px in height) and place your static stuff inside. (by default the sum of all default band heigths are not allowed to be larger than the page height itself - EXCEPT group headers/footers!) That's the trick!

hth + regards

C-Box

C-Box's picture
24067
Joined: Jul 19 2006 - 5:58pm
Last seen: 4 weeks 9 hours ago
Feedback
randomness