Jump to content

Recommended Posts

Posted

Hi,

I have following XML file and I am trying to display a parent and it's related children in the jasper report.

<family>
    <parent parentName="John">
        <children>
            <child childName="John Junior 1"/>
            <child childName="John Junior 2"/>
        </children>
    </parent>
    <parent parentName="Mike">
        <children>
            <child childName="Mike Junior 1"/>
            <child childName="Mike Junior 2"/>
            <child childName="Mike Junior 3"/>
        </children>
    </parent>
</family>

 

I am trying to create a report to show below:

John
    John Junior 1
    John Junior 2

Mike
    Mike Junior 1
    Mike Junior 2
    Mike Junior 3

 

But it is showing as below:

John
    John Junior 1
    John Junior 2
    Mike Junior 1
    Mike Junior 2
    Mike Junior 3

Mike
    John Junior 1
    John Junior 2
    Mike Junior 1
    Mike Junior 2
    Mike Junior 3

 

Can someone help?

thanks

 

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

Thank you for the suggestion.  I have already tried that and it still does not work.  I am trying to figure out how the dataset (XML) can have the <child>  node within the parent node.

Anyone have an example of JaspeReport Studio report file (with sample xml)?

thanks

 

 

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