2004 IR Help Posted August 22, 2006 Share Posted August 22, 2006 By: cando - cando05 External Group By in my XML 2005-07-12 10:03 I?m working on a project where the xml generated for a report already contains grouping and aggregate calculations. I?ve successfully made simple jasper reports where jasper identifies the group change and performs the calculation (min/max/count), but I don?t understand how to use this new xml layout style where the groups are pre-computed. Example Report Description: Survey results showing a state?s fun rating, grouped by city and state. The fun rating calculation is complex and is computed in the xml before the report is rendered. State Fun Factor Minnesota Mighty Fun City Population Activity Types St.Paul 300,000 2 Activity Count Hiking 120 Running 10 City Population Activity Types St.Cloud 150,000 2 Activity Count Bicycling 75 Walking 34 City Population Activity Types Duluth 70,000 2 Activity Count Ice Fishing 100 Ice Sculpture 25 State Fun Factor Wisconsin Mostly Fun City Population Activity Types Madison 400,000 2 Activity Count Reading 80 Play Cards 10 . . . The XML source contains the following elements: <?xml version="1.0" encoding="UTF-8"?> <searchResults> <group1 count="1"> <!--group1 is used for state information --> <name>Minnesota</name> <funFactor>Mighty Fun</funFactor> <group2 count="1"> <!-- group2 is used to hold city information--> <name>St.Paul</name> <population>300000</population> <activityCount>2</activityCount> <group3> <name>Hiking</name> <count>120</count> </group3> <group3> <name>Running</name> <count>10</count> </group3> </group2> <group2 count="1"> <!-- group2 is used to hold city information--> <name>St.Cloud</name> <population>150000</population> <group3> <name>Bicycling</name> <count>75</count> </group3> <group3> <name>Walking</name> <count>34</count> </group3> </group2> <group2 count="1"> <!-- group2 is used to hold city information--> <name>Duluth</name> <population>70000</population> <activityCount>2</activityCount> <group3> <name>Ice Fishing</name> <count>100</count> </group3> <group3> <name>Ice Sculpture</name> <count>25</count> </group3> </group2> </group1> <group1 count="1"> <!--group1 is used for state information --> <name>Wisconsin</name> <funFactor>Mostly Fun</funFactor> <group2 count="1"> <!-- group2 is used to hold city information--> <name>Madison</name> <population>400000</population> <activityCount>2</activityCount> <group3> <name>Reading</name> <count>80</count> </group3> <group3> <name>Play Cards</name> <count>10</count> </group3> </group2> </group1> </searchResults> Has anyone been successful configuring a jasper report with this kind of xml layout? My first guess is that it is not supported, but I thought that I should ask just in case someone has already solved it. Thanks for looking. 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