2004 IR Help Posted August 20, 2006 Share Posted August 20, 2006 By: brent - bvbenson XML report display 2005-01-11 05:08 How do I display multiple children nodes given a parent node. For instance this xml (due to spacing issues I am using - for easier readability): <response> ----<contract> --------<name>c1</name> --------<type>moMoney</type> --------<checks> ------------<check pk="1"> ---------------<amount>100</amount> ------------</check> ------------<check pk="2"> ---------------<amount>300</amount> -------------</check> --------</checks> ----</contract> <response> Now, how I need to display it is in a single table name--type--------checkid---amount c1-----moMoney---1---------100 -------------------2---------300 How can I have multiple checks and amounts be displayed for a given name and type? The closest I have come to this is: name--type--------checkid---amount c1-----moMoney---null-------null -------------------1---------100 -------------------2---------300 But that is not acceptable. Please help!! Thanks. Brent By: Teodor Danciu - teodord RE: XML report display 2005-01-11 10:04 Hi, Have you tried the isPrintRepeatedValues="false" for your first two columns? Another solution would be to use the <printWhenExpression> tag on your first two columns by testing the build-in group count variable to be equal to 1 (you need a group on contract). I hope this helps. Teodor I hope this helps. Teodor By: brent - bvbenson RE: XML report display 2005-01-11 12:48 I think the issue resides more in the fact that the two checks are under a contract, and the report is listing based on one row per contract. I was able to get around this with creating a sub-report, I just think I have to be doing something wrong. I would thing that JasperReport would be able to handle a record having 2 or more children records and displaying it similar to my original post. Please let me know if anyone can think of a better way than using a subreport. Thanks. Brent 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