Jump to content
Changes to the Jaspersoft community edition download ×

Need HELP with XMLDatatsource

2004 IR Help

Recommended Posts

By: chiphi13 - chiphi13

Need HELP with XMLDatatsource

2004-12-15 09:06

I am very new to using jasperreport and ireports. I am try to create a report using an xml document as the datasource:

<?xml version="1.0" encoding="ISO-8859-1"?>


<cd country="USA">

<title>Empire Burlesque</title>

<artist>Bob Dylan</artist>



<cd country="UK">

<title>Hide your heart</title>

<artist>Bonnie Tyler</artist>



<cd country="USA">

<title>Greatest Hits</title>

<artist>Dolly Parton</artist>





I have set up the datasource with the following expression:


when i try clicking on the test button nothing happens.


I have then created a new report and added a field

with the following field description:



When I try executing the report, I receive the following error not matter what i try:


Compiling to file... .test.jasper -> .Test.java Errors compiling .test.jasper! net.sf.jasperreports.engine.JRException:?Report?design?not?valid?:? ?????1.?Field?not?found?:?Field ????at?net.sf.jasperreports.engine.design.JRAbstractJavaCompiler.compileReport(JRAbstractJavaCompiler.java:111) ????at?net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:137) ????at?net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:142) ????at?net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:130) ????at?it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:336) ????at?java.lang.Thread.run(Unknown?Source)


I REALLY APPRECIATE ANY AND ALL HELP!!!!!!!! What am I doing wrong? Does anyone have steps for setting this up properly?






By: Wal Millard - walmillard

RE: Need HELP with XMLDatatsource

2004-12-15 19:42


You have a Field Object on your report with


$F{Field} in the expression.


You need to set "Field" to the name of your field. ie in this case something like




I suggest you search the help forum for




and you will find some stuff to read.


then you will be very embarrassed about this post.









By: chiphi13 - chiphi13

RE: Need HELP with XMLDatatsource

2004-12-16 07:04

I actually found the problem before your post, but thanks for the input and vote of encouragement. The problem was there was a field attribute that was added to the report that wasn't visible on the gui, but when i looked at the outline it was there. Once I removed that, low and behold it worked!!

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