2006 IR Open Dicussion Posted August 26, 2006 Share Posted August 26, 2006 By: ChrisWolf_DE - chriswolf_de crosstab and NoSuchMethodException 2006-02-14 04:57 Hi all, i am a beginner with Jasper and want to a simple crosstab. I am using Reports 1.2.0 and get a strange error when trying to compile the report definition: "java.lang.NoSuchMethodException: No such accessible method: addElement() on object: net.sf.jasperreports.engine.design.JasperDesign at org.apache.commons.digester.Digester.createSAXException(Digester.java:2919)" If I comment out the crosstab definition from my xml (see below) then it compiles fine (of course it does nothing then...) Does anybody has an idea where I may look next? <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="Summary" orientation="Landscape" leftMargin="10" rightMargin="10" pageWidth="1000" pageHeight="500"> <subDataset name="TRADES" whenResourceMissingType="Null"> <queryString language="sql"> <![CDATA[ SELECT Month, Type FROM fx_arch ]]> </queryString> <field name="Month" class="java.lang.String" /> <field name="Type" class="java.lang.String" /> </subDataset> <detail> <!-- <crosstab> <reportElement x="0" y="20" width="300" height="200"/> <crosstabDataset> <dataset> <datasetRun subDataset="FXTRADES"> </datasetRun> </dataset> </crosstabDataset> </crosstab> --> </detail> </jasperReport> By: ChrisWolf_DE - chriswolf_de crosstab and NoSuchMethodException 2006-02-14 05:00 uups...due to some editing changes in this board there seems to be the error that I use different subDataset names, but in the code they are the same ;-) Many thanks in advance. Chris By: Lucian Chirita - lucianc RE: crosstab and NoSuchMethodException 2006-02-14 05:07 Hi Do you have xml validation turned off? The JRXML should look like this <detail> <band height=".."> <crosstab ...> HTH, Lucian By: ChrisWolf_DE - chriswolf_de RE: crosstab and NoSuchMethodException 2006-02-14 05:29 Many thanks Lucian, this now leads to much more reasonable error messages (I have to set up the cross tab now properly...). 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