How to dynamically set orientation or page height/width to portrait/landscape

Hello,

Is anyone knows how to dynamically set orientation or page height/width to portrait/landscape ?

If you need to print images, sometimes portrait, sometimes landscape, how would you achieve that ?

I may use subreports but how is the parameter(s) you need to send ? Would it be enough for the subreport to understand it ?  parameter with name "net.sf.jasperreports.engine.type.OrientationEnum" and value "OrientationEnum.LANDSCAPE" then the subreport understand it? Same for the page height/width ?

I'm sure someone already tried to do that but didn't find the answer...

Thanks in advance for your help

PS : I added a screenshot

yann22580's picture
682
Joined: Apr 29 2015 - 1:10am
Last seen: 11 months 1 day ago

Has anyone ever tried to do this??

In this case : https://community.jaspersoft.com/questions/1142101/how-set-page-height-p...

Swood_1 proposes to use 2 subreports and you set dynamically which image goes to the 1st or the 2nd subreport.

That is a solution bit I hoped there was one with only one report.

Comments are welcome

yann22580 - 4 years 2 weeks ago

0 Answers:

No answers yet
Feedback
randomness