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

andfedotov

Members
  • Posts

    62
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by andfedotov

  1. Apache 2 != Apache Tomcat If you want to run your java web app you need to have a web server with servlets/jsp support. Try to run demo apps that comes with jasperreports in order to be sure that you have everything fine with jasperreports itself. Btw, you need to have Ant installed to do it
  2. Hongwei, I have no problem with compiling this report. Looks like it's something wrong with the jrxml file itself (XML Parser complains on DOCTYPE). Have you ever edited it?.. Try the original file - it should be ok
  3. My thought is that you might have some problems with classpath.. Make sure jasperreports-3.5.1.jar or compiled classes dir is in your classpath and no previous versions of jasperreports is overwriting this...
  4. Well, at first let's unite 2 discussion threads (on of them on Project Tracker) cause it's starting going a bit messy -------------------------------------------------------------------------------------------------------------------- hongwei 20/05/2009 10:33 AM Cannot compile JRXML with jasperreports-3.5.1.jar, for example, try to run samples/templates, give command ant compile, get exception, Error compiling report design : D:\source\JasperReports\jasperreports-3.5.1\demo\samples\templates\Styles.jrxml net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: Document root element "jasperReport", must match DOCTYPE root "null". at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:242) at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:225) at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:213) at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:167) at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:151) at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:107) at net.sf.jasperreports.ant.JRAntCompileTask.compile(JRAntCompileTask.java:398) at net.sf.jasperreports.ant.JRAntCompileTask.execute(JRAntCompileTask.java:252) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) at org.apache.tools.ant.Project.executeTarget(Project.java:1298) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1181) at org.apache.tools.ant.Main.runBuild(Main.java:698) at org.apache.tools.ant.Main.startAnt(Main.java:199) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) Caused by: org.xml.sax.SAXParseException: Document root element "jasperReport", must match DOCTYPE root "null". at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.rootElementSpecified(XMLDTDValidator.java:1621) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidator.java:1900) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:764) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1359) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDriver.scanRootElementHook(XMLDocumentScannerImpl.java:1316) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3095) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:921) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:238) Best wishes Hongwei -------------------------------------------------------------------------------------------------------------------- andfedotov 20/05/2009 11:19 AM Hongwei, I have no problem with compiling this report. Looks like it's something wrong with the jrxml file itself (XML Parser complains on DOCTYPE). Have you ever edited it?.. Try the original file - it should be ok -------------------------------------------------------------------------------------------------------------------- hongwei 20/05/2009 01:53 PM I have also no problem with compiling jrxml using jasperreports-2.0.4.jar, which uses jaspereports.dtd. but using jasperreports-3.5.1.jar, which uses jasperreports.xsd have problem. for example, in file samples/templates/Styles.jrxml, which uses xml schema jasperreports.xsd, the root element is: <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="Styles" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="30" bottomMargin="30" whenNoDataType="AllSectionsNoDetail"> ... </jasperReport> so it does not work. Best wishes Hongwei
  5. I personally have no problem with this report, everything goes smoothly in my case...
  6. Is it ok that there's nothing printed in the section before column footer (the one where invoice_footer is situated). Is it possible that this section occupy some place so that column footer is printed right after it, and not after previous section, as you're expecting?
  7. One more thing... Please update JasperReports Datasheet requirement section to 1.4 from 1.3 Project: JasperReports > Requirements > Project Resources > JasperReports Datasheet http://www.jaspersoft.com/downloads/Datasheet/jasperreports-0206.pdf
  8. There's also a 1.5's method Boolean.parseBoolean in createDialChart in net.sf.jasperreports.engine.fill.DefaultChartTheme
  9. Take a look here Looks like this issure has been resolved
  10. Well, it should work, actually... At least in my case it did. Make sure you have isFloatColumnFooter="true" in your jrxml... And rebuild your report...
  11. set evaluation time for the average field = group Post Edited by andfedotov at 18/05/2009 05:36 PM
  12. You need to rewrite methods escapeJavaStringLiteral in net.sf.jasperreports.engine.util.JRStringUtil and createDialChart in net.sf.jasperreports.engine.fill.DefaultChartTheme to eliminate usage of 1.5's methods String.replace and Boolean.parseBoolean After that recompile jasperreports project using 1.4 jdk
  13. Not sure what you find wrong with subdatasource, but whatever.. You might also consider using ((net.sf.jasperreports.engine.data.JRXmlDataSource) $P{REPORT_DATA_SOURCE}).dataSource("xpath") - it will select nodes from the top of your xml, not from the current node like subdatasource. Hope it might help...
  14. Yep, looks like escapeJavaStringLiteral method of JRStringUtil uses replace method of String class which was introduces in java 1.5
  15. what about this as a first line? <?xml version="1.0" encoding="UTF-8"?>
  16. Even better version that uses subDataSource method instead of dataSource that frees you from the mandatory of using id attribute for your xml nodes <subDataset name="dataset1"> <queryString language="xPath"> <![CDATA[]]> </queryString> <field name="C_id" class="java.lang.String"> <fieldDescription><![CDATA[./@id]]></fieldDescription> </field> <field name="D" class="java.lang.String"> <fieldDescription><![CDATA[D]]></fieldDescription> </field> <field name="E" class="java.lang.String"> <fieldDescription><![CDATA[E]]></fieldDescription> </field> </subDataset> <componentElement> <reportElement x="31" y="31" width="400" height="20"/> <jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd"> <datasetRun subDataset="dataset1"> <dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource) $P{REPORT_DATA_SOURCE}).subDataSource("/B/C")]]></dataSourceExpression> </datasetRun> <jr:listContents height="20"> <textField isBlankWhenNull="true"> <reportElement x="13" y="0" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{C_id}]]></textFieldExpression> </textField> <textField> <reportElement x="127" y="0" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{D}]]></textFieldExpression> </textField> <textField> <reportElement x="246" y="0" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{E}]]></textFieldExpression> </textField> </jr:listContents> </jr:list> </componentElement>
  17. Well, that's strange. I have no such issue. Try with jasperreports-3.5.1, although schema validation was introduced at version 3.1.0 Take a closer look at your classpath...
  18. There's a SP2 available now. Try it, it might help.. I don't have crashes with your file
  19. I personally don't think it's possible... Actually copying variables from one report to other is quite simple: just select all variables in one report, copy them and paste in other report. :)
  20. Looks like you have some problems with your report parameters. Create a simple report (say, with one TextField) and try it, so that you discover what was the cause of your problem.
  21. Here's what I've got It might be a little different from your's cause I run it with an empty datasource.. Post Edited by andfedotov at 15/05/2009 10:28 AM
  22. Hmm, I've got much better result after removing this rectangle (btw, what was it's purpose?). After that I got all lines on place, even though, as I said before, don't be surprised with an odd behaviour of html exporter when you have so much field overlapped..
×
×
  • Create New...