ckell Posted May 12, 2007 Share Posted May 12, 2007 Is there a way to force a page break before a detail "group", if the detail and its "subreport" would span pages? Thanks-chris Link to comment Share on other sites More sharing options...
Case1182 Posted May 12, 2007 Share Posted May 12, 2007 are you talking about a page break or a page termination/code termination?, do you want it to break and start a new page or stop processing the report after it reaches one page? Link to comment Share on other sites More sharing options...
ckell Posted May 12, 2007 Author Share Posted May 12, 2007 I as newbie, I'm not sure what you mean by page/code termination (not yet accustom to iReport terminalogy.) Basically, I don't want the output for a student to span two pages. For example, student "A's" imaging begins near the bottom of the page, and continues onto the next. I'm wishing to avoid this. For this situation I want a page break to occur prior to imaging student "A" so that student "A's" data appears at the top of a new page. Thanks for your interest in helping. -chris Link to comment Share on other sites More sharing options...
redwine Posted May 15, 2007 Share Posted May 15, 2007 ckell, i have not used page breaks before but here's what i think you could try out:insert a page/column break at the point where you want to start a new page (based on your conditions).you could do this by - clicking Edit > Insert Page/Column Break. you will then see your cursor turn into cross-hairs.- click the cross-hairs at the point where you want to break (before a report section maybe). next, make the properties dialog box for the page break element appear.do this by - right clicking on the page break element that you just positioned.- then click the Common tab... you will see the Print when expression text box below.- now, based on what your conditions are (and you must be very clear on what they are for it to work according to how you want it to work), type your boolean expression in here. this will control WHEN or IF your page break element should display (meaning "break the page"). you know what, since i'm doing a report that's very long, i'm going to give it a try and see if my theory will work... then i could use it if it works :) hey, don't worry about being a newbee here... you'll get better at using iReport as you go along... one day you'll realize that you've gone a long way. everyone here is out to help in their own humble way. in time, sooner than you think, you will be able to do this too. i'll let you know how it goes... let me know how you do on your end. Edwin Post edited by: edwin, at: 2007/05/14 20:49Post edited by: edwin, at: 2007/05/14 20:50 Link to comment Share on other sites More sharing options...
rsilverns.sympatico.ca Posted December 12, 2007 Share Posted December 12, 2007 I'm sure I am overlooking some basic fact about the <break> element here so wanted to post and hopefully get my confusion cleared up. I created the attached sample report that illustrates my problem. It is a LONG detail band that is longer than 1 page and has a break element roughly 20px above where the first page ends. I tried to view it to see the break in action but I get the error:Code:net.sf.jasperreports.engine.design.JRValidationException: Report design not valid : 1. The detail section, the page and column headers and footers and the margins do not fit the page height. at net.sf.jasperreports.engine.design.JRAbstractCompiler.verifyDesign(JRAbstractCompiler.java:260) at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:144) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:220) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:153) at com.test.ReportRunner.main(ReportRunner.java:21) Shouldn't I be able to use the break element this way? Detail bands can span multiple pages normally, so wondering how i can design my report 'pages'. I really want to avoid using any work arounds as I really embraced the break element to avoid the usual group header-page workaround. Link to comment Share on other sites More sharing options...
rsilverns.sympatico.ca Posted December 12, 2007 Share Posted December 12, 2007 Whoops.. forgot to attach.. here you go. [file name=pagebreak_sample-686ab5774e1dc546dc0c73f4182fa469.jrxml size=1678]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/pagebreak_sample-686ab5774e1dc546dc0c73f4182fa469.jrxml[/file] Post edited by: rsilver@bfm.bm, at: 2007/12/12 14:25 Link to comment Share on other sites More sharing options...
rsilverns.sympatico.ca Posted December 12, 2007 Share Posted December 12, 2007 Whoops.. forgot to attach.. here you go. [file name=pagebreak_sample.jrxml size=1678]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/pagebreak_sample.jrxml[/file] 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