This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes Unified Printing API - JSR6 and the fly likes Change report size in Jasper Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java JSRs » Unified Printing API - JSR6
Bookmark "Change report size in Jasper" Watch "Change report size in Jasper" New topic

Change report size in Jasper

Nandan Jain
Ranch Hand

Joined: Feb 14, 2006
Posts: 44
Hi All,
I am printing data in a PDF using Jasper and it is working fine. The only issue is size of the the report. Since I have dynamic number of rows and columns in my report so I am using Cross tab in Jasper. I know that total number of columns would always be 22 or less so I have chosen a big report size. But I think there is a way to set the report size on runtime. Since I know how many columns are there in my data set I can always set report size accordingly before generating PDF.
I am using Spring 3.1 and Jasper 4.6 in my project. In the controller I get reference of the below bean and it is set in the ModelAndView which is returned to client.

I want to understand how can I change the report size?

I agree. Here's the link:
subject: Change report size in Jasper