chs_rachel86 Posted January 12, 2009 Share Posted January 12, 2009 Hi anyone,may i know is there any page break fucntion in jasper report?I need to break the page by a group. So what is the instruction in order to break a page by group? Link to comment Share on other sites More sharing options...
C-Box Posted January 13, 2009 Share Posted January 13, 2009 What about the attribute "isStartNewPage" at the group properties!?!?!?Just set this to true and you'll be happy! :-) hthC-Box Link to comment Share on other sites More sharing options...
luke23 Posted January 13, 2009 Share Posted January 13, 2009 Unfortunately, in my case 'isStartNewPage' set to true doesn't work and I have no idea why. Is it bug in 3.1.2? http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=50520 Link to comment Share on other sites More sharing options...
chs_rachel86 Posted January 13, 2009 Author Share Posted January 13, 2009 i able to break the page according to the group dy, which is insertpage/columnbreak under the edit toolbar,but when i use this features, my report will print the title and column header as well even there is not data inside, may i know how to solve this? Link to comment Share on other sites More sharing options...
luke23 Posted January 15, 2009 Share Posted January 15, 2009 "So what is the instruction in order to break a page by group?"I solved this problem by setting appropriate value of minHeightToStartNewPage and printWhenExpression for group.I hope this would help:-) Link to comment Share on other sites More sharing options...
C-Box Posted January 16, 2009 Share Posted January 16, 2009 The pagebreak by a group will just work if the result of the groupexpression will change accordingly to the previous result of groupexpression. If you have just one record or if your (dummy)group-expression will always return the same result you won't get a page-break caused by "isStartNewPage" attribute.That's why the manual page-break element would be helpfull in some cases. just my two cents. Link to comment Share on other sites More sharing options...
dhamayanthikd Posted April 27, 2010 Share Posted April 27, 2010 "That's why the manual page-break element would be helpfull in some cases."How can we insert manual page break. Im setting A4 size page and preivew from the Jasper viewer shows perfect. But when I print it is not. Is there any way to insert page break manually wherever we want?Thanks for your time. Link to comment Share on other sites More sharing options...
charliesuco Posted April 27, 2010 Share Posted April 27, 2010 There is a "Break" element in the "Palette" window. You can insert it in your report and choose "Column Break" or "Page Break". (Sometimes it adds a blank page if you don't control it with the "Print when expression"). I hope this helps you.Post Edited by charliesuco at 04/27/2010 10:29I forgot to tell that I am using version 3.7.1Post Edited by charliesuco at 04/27/2010 11:17 Link to comment Share on other sites More sharing options...
prasun Posted May 25, 2010 Share Posted May 25, 2010 Hi,I am facing a peculiar problem with page break and page footer.Here is an explanation to re create it.1) create a report with one text field, print it in the detail band.2) print the same field in the page footer.3) insert a page break before the field in the detail band. Put a simple select query which gives you 4-5 values for your field value. The issue that you will notice with the output is that the page footer will print the value which comes on the next page rather than the value which is coming on the same page. I am attaching my sample pdf generated for you to look at. The footer value in the sample is printed in blue color to make the distinction from the value in the detail band but actually they both are the same values.Thanks in advance!!!Prasun Code:<?xml version="1.0" encoding="UTF-8"?><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report1" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <queryString> <![CDATA[select site_id from site]]> </queryString> <field name="SITE_ID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <background> <band splitType="Stretch"/> </background> <title> <band height="79" splitType="Stretch"/> </title> <pageHeader> <band height="35" splitType="Stretch"/> </pageHeader> <columnHeader> <band height="61" splitType="Stretch"/> </columnHeader> <detail> <band height="57" splitType="Stretch"> <textField> <reportElement x="0" y="33" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{SITE_ID}]]></textFieldExpression> </textField> <break> <reportElement x="0" y="32" width="100" height="1"/> </break> </band> </detail> <columnFooter> <band height="45" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="54" splitType="Stretch"> <textField> <reportElement x="43" y="16" width="100" height="20" forecolor="#3300FF"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{SITE_ID}]]></textFieldExpression> </textField> </band> </pageFooter> <summary> <band height="42" splitType="Stretch"/> </summary></jasperReport> Link to comment Share on other sites More sharing options...
charliesuco Posted May 31, 2010 Share Posted May 31, 2010 Page breaks usually do strange things, what do you need it for? Link to comment Share on other sites More sharing options...
jemvural Posted July 26, 2012 Share Posted July 26, 2012 Is there anywy to break by value of data in a column? I would like to put a break in after a certain value of my data changes.For example I retrieve the data from the databaseG1 CCG1 BBG1 AAB2 CCB2 BBB2 AA I would like to group them by the first columnFor example I would like to to look like this. G1 CCG1 BBG1 AA <insert break at this point once first column value changes> B2 CCB2 BBB2 AA 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