2001 JI Open Discussion Posted August 15, 2006 Share Posted August 15, 2006 By: Baiju Thakkar - baiju12 Print 2 separate pages in 1 report 2002-08-14 16:04I apologize if this is a very simple question. But I could not find any examples in the excellent documents. I would like to simply print 1 report that has 2 pages. Both pages have the same header. Page 1 has one small image with text "Hello Page 1". Page 2 has another small image with text "Hello Page 2" I could not figure out how to do page breaks. Can anyone help wiith the xml needed to accomplish a simple task. Thank you very much. By: Teodor Danciu - teodord RE: Print 2 separate pages in 1 report 2002-08-14 23:43 Hi, Is you report somehow static? Does it always have 2 pages and prints only static information or supplied by parameters and nothing from the data source? I imagine you are trying to generate something like the two covers of a book. If this is the case, then you can design the first page using the title section of the report and the second page using the summary section. Set all the other band heights to zero (headers, footers and detail). Make sure you specify that isTitleNewPage="true". When you fill the report, supply to the report filling method this data source: new JREmptyDataSource(1) But if your design is more complicated than this, and in fact what you need is to be able to generate reports with more than two pages and you want to control the page breaks, the only way is to introduce groups in your report design. Only at group level you have the possibility to say that you want your group to start a new page every time it changes. For example, if I would want to have a new page started for every row in may data source, then I would introduce a "dummy" group that breaks with every row and use isStartNewPage="true". The expression for this dummy group can be: <groupExpression>$V{REPORT_COUNT}</groupExpression> I hope this helps. Teodor By: Baiju Thakkar - baiju12 RE: Print 2 separate pages in 1 report 2002-08-15 07:12Yes, the report is in fact much more complicated than 2 static pages, it would be basically 1 static title page, and upto 100 dynamic pages. Where the pages consists of different sections. What I needed was a specific page break when a section ends. So the next section starts in a new page. Yes grouping is exactly what we need with subreports. BT Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now