Jump to content
Changes to the Jaspersoft community edition download ×

Error with field


2004 IR Help

Recommended Posts

By: Herve - hguidetti

Error with field

2004-11-26 02:09

Hi all,

 

I have a problem using IReport 0.4.0. It seams that it automatically place a field my document. In the XML file, this field is inserted.

<textFieldExpression class="java.lang.String"><![CDATA[$F{Field}]]></textFieldExpression>

 

Then when I use it from my java application, I get an error because I don't have any fields with the name 'Field'.

java.lang.NoSuchMethodException: Unknown property 'Field'

at org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:1175)

at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:772)

at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801)

at net.sf.jasperreports.engine.data.JRBeanCollectionDataSource.getFieldValue(JRBeanCollectionDataSource.java:146)

at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:727)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:184)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:558)

at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:160)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:353)

at net.sf.jasperreports.engine.JasperManager.fillReport(JasperManager.java:885)

at com.sgs.transitnet.reports.ReportManager.producePdfReport(ReportManager.java:116)

at com.sgs.transitnet.reports.ReportManager.producePdfReport(ReportManager.java:68)

at com.sgs.transitnet.declaration.command.CreatePdfDeclarationCommand.execute(CreatePdfDeclarationCommand.java:94)

at com.sgs.transitnet.declaration.test.command.TestCreatePdfDeclarationCommand.testCreatePdfDeclaration(TestCreatePdfDeclarationCommand.java:61)

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:324)

at junit.framework.TestCase.runTest(TestCase.java:154)

at junit.framework.TestCase.runBare(TestCase.java:127)

at junit.framework.TestResult$1.protect(TestResult.java:106)

at junit.framework.TestResult.runProtected(TestResult.java:124)

at junit.framework.TestResult.run(TestResult.java:109)

at junit.framework.TestCase.run(TestCase.java:118)

at junit.framework.TestSuite.runTest(TestSuite.java:208)

at junit.framework.TestSuite.run(TestSuite.java:203)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)

 

 

If you have any clue.

Thanks a lot !

 

Herv馮bsp;

 

P.S : I don't want to have any field in my document.

 

 

 

 

 

By: Andrew McLaughlin - pik0

RE: Error with field

2004-11-26 08:50

Check your report layout very carefully. You must have an item in there somewhere that references Field... :)

 

Piko

 

 

 

 

By: alanHardwick - alan314

RE: Error with field

2004-12-01 03:41

This normally happens if you select the textfield

tool and accidently click somewhere in the report without propely placing a field. It places a field in the report but you can see it as the height is 0 (and the default field name is {field} )

 

Its easy to fix. In the Project Browser Window, click on the Document structure tab, click on all the text field tabs, until you find the one you accidently placed and delete it from there...!!!

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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...