cHaOs667 Posted December 4, 2006 Share Posted December 4, 2006 Hello, i've made already an entry in the iReport discussion but maybe this is the better place to discuss my problem. Heres my posting: Hello there, i have an XML file as an datasource and different XML Elements which should be repeated but it only repeats one of the elements. The XML file looks like this Code: <?xml version="1.0" encoding="ISO-8859-1"?><TAXPDF> <HEAD> . . </HEAD> <DETAIL> <TEXTBLOCK> <LINE id="01"> <TEXT>some text</TEXT> </LINE> <LINE id="02"> <TEXT>some more text</TEXT> </LINE> <LINE id="03"> <TEXT>much more text</TEXT> </LINE> </TEXTBLOCK> <POSITIONS> <POSITION id="01"> . . </POSITION> <POSITION id="02"> . . </POSITION> </POSITIONS> </DETAIL></TAXPDF> My Datasource is targetting at '/TAXPDF/DETAIL/TEXTBLOCK/LINE' and if i generate now my report, it only repeats the elements in the 'LINE' blocks and prints only the first 'POSITION' element and not the other ones. If i change it to '/TAXPDF/DETAIL' i can't repeat neither the 'LINE' elements nor the 'POSITION' elements. Does anyone has an idea what might be wrong?Or do i have to creat an subreport? Regards,Dennis Trabandt PS: Sorry for my english, it's not that good as it should be. Link to comment Share on other sites More sharing options...
lucianc Posted December 6, 2006 Share Posted December 6, 2006 You can consult the JRXmlDataSource javadoc if you have doubts about the way it works. If you need to iterate on several heterogeneous node lists, you will indeed need to use subreports. Regards,Lucian Link to comment Share on other sites More sharing options...
cHaOs667 Posted December 15, 2006 Author Share Posted December 15, 2006 I fixed my Problem with different XPath Expressions.. in the JRXML Datasource i can insert different paths separated by an '|' 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