开发者

How to generate PDF reports that spans multiple pages horizontally

I have to generate PDF reports with many (defined at runtime) columns. These reports may span multiple pages horizontally when user selects many fields to show. I'm using DynamicJasper and could successfully generate dynamic reports when all the columns fit in one page. When they don't, report is cropped and only a few columns are shown. I've tried changing the page width in runtime and report is not cropped, but it can't be printed correctly because page size is not standard. Which is the right way to generate this kind of reports?

The goal is to split big tables in multiple pages if they exceed page width, like when printing a spreadshee开发者_开发知识库t.

Is it possible to achieve it using JasperReports?


Since you also want to print the report, you will have to work from standard print sizes (such as A4 and A3) and a landscape orientation since width is the issue.

To get the most possible on a page: 1) Use smaller fonts 2) Use landscape page orientation 3) Use a larger page size (A3, A2...) as long as your printer can handle it

If you still can't fit on a page, think about how you want to lay out the result - what would you like to see if someone gave a really big table to you? You will need to split the table into some columns for one page and some columns for another.

Hope that helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜