Jump to content
We've recently updated our Privacy Statement, available here ×

Page break example please..


auvrm1

Recommended Posts

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Yeah I heard that they introduced the better way of handling the breaks in 1.3.0 version. I do not use 1.3.0 version.

 

In the 1.2.5, there is an exmple under

"jasperreports-1.2.5demosamplesnopagebreak"

 

Check the following blog entry to know how to run the samples.

http://www.jasperforge.org/index.php?option=com_mamblog&task=show&action=showmyblog&Itemid=109

 

 

Check the following link about noPageBreak

http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&id=8834&catid=8

 

Link to comment
Share on other sites

Hi,

 

do not use iReport to create the break-element because iReport-designer does not save the element into the layout-file.

 

Youe may insert the break under the band-tag, e.g.:

Code:

<band>
.....
<break type="Page">
<reportElement
x="0"
y="17"
width="784"
height="1"
key="element-1"/>
</break>
</band>

 

Marcus

Link to comment
Share on other sites

Hi,

 

when i use the page break element, am getting the following error

 

Code:
[jrc] Jan 11, 2007 8:57:00 AM org.apache.commons.digester.Digester error
[jrc] SEVERE: Parse Error at line 354 column 23: Element type "break" must be declared.
[jrc] org.xml.sax.SAXParseException: Element type "break" must be declared.
[jrc] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
[jrc] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
[jrc] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
[jrc] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
[jrc] at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
[jrc] at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
[jrc] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
[jrc] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
[jrc] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
[jrc] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
[jrc] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
[jrc] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
[jrc] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
[jrc] at org.apache.commons.digester.Digester.parse(Digester.java:1572)
[jrc] at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:238)
[jrc] at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:225)
[jrc] at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:213)
[jrc] at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:167)
[jrc] at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:151)
[jrc] at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:107)
[jrc] at net.sf.jasperreports.ant.JRAntCompileTask.compile(JRAntCompileTask.java:398)
[jrc] at net.sf.jasperreports.ant.JRAntCompileTask.execute(JRAntCompileTask.java:252)
[jrc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[jrc] at org.apache.tools.ant.Task.perform(Task.java:364)
[jrc] at org.apache.tools.ant.Target.execute(Target.java:341)
[jrc] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[jrc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[jrc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[jrc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[jrc] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[jrc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[jrc] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[jrc] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

 

can you please suggest me whats wrong or how to declare the break element.

 

Thanks

 

mg72 wrote:

Hi,

do not use iReport to create the break-element because iReport-designer does not save the element into the layout-file.

Youe may insert the break under the band-tag, e.g.:
Code:
[code]
<band>
.....
<break type="Page">
<reportElement
x="0"
y="17"
width="784"
height="1"
key="element-1"/>
</break>
</band>

 

Marcus

Link to comment
Share on other sites

  • 1 month later...
  • 8 years later...

The problem seems with the specifications of the page positions.  Suppose I have 4 elements, each of height 300 and want a page break after the second.  How do I specify the position of the third and fourth block (such that it compiles)?  What is the correct position for the page break (x and y)?


Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...