Calculate report's width and height at runtime

Hi all, 

i must export report to png image, my report has three bands (Title, detail and summary).

Title height is 290 pixels.

Details height is 270 pixels

Summary height is 460 pixels.

The total height is 1020 pixels.

In according to the contents the total eight may be greather than 1020 pixel, how i get in my java program the real height at runtime?

If i write in java: 

jasperDesign = JRXmlLoader.load(inputStream);

jasperDesign.getPageHeight() -----> this return 1020 and not the real height at runtime

 

pippolotto's picture
Joined: Jul 21 2017 - 6:42am
Last seen: 5 years 11 months ago

1 Answer:

You need to create a JasperPrint object using the JasperReports API. Here is a howto example:

http://jasperreports.sourceforge.net/sample.reference/noreport/index.html

shertage's picture
22320
Joined: Sep 26 2006 - 8:06pm
Last seen: 2 months 3 weeks ago
Feedback