Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
nested XML data
fishdan
I am using an XML dataset like this:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<?xml version="1.0" encoding="UTF-8"?>
<people>
<person>
<name><![CDATA[John]]></name>
<phone>
<type><![CDATA[home]]></type>
<number><![CDATA[314-159-2653]]></number>
</phone>
<phone>
<type><![CDATA[cell]]></type>
<number><![CDATA[271.828.1828]]></number>
</phone>
</person>
<person>
<name><![CDATA[Mary]]></name>
<phone>
<type><![CDATA[mobile]]></type>
<number><![CDATA[987-159-2653]]></number>
</phone>
</person>
<person>
<name><![CDATA[Steven]]></name>
<phone>
<type><![CDATA[home]]></type>
<number><![CDATA[222-159-2653]]></number>
</phone>
<phone>
<type><![CDATA[work]]></type>
<number><![CDATA[(872) 828-1828]]></number>
</phone>
<phone>
<type><![CDATA[Skype]]></type>
<number><![CDATA[555.828.1828]]></number>
</phone>
</person>
</people>
</pre>
<br />
I want to make a table that displays the person's name in the left column and then has a sub table in the right column. That table has two columns, the left is the phone type, and the right is the number.<br />
<br />
so the tables would look like:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>John | Home : 314-159-2653
| Cell : 271.828.1828
Mary | Mobile : 987-159-2653
Steve | Home : 222-159-2653
| work : (872) 828-1828
| Skype : 555.828.1828</pre>
<br />
<br />
My problem is that if I create one dataset I only get one phone for each person.<br />
I can create a dataset for phones, but then I get the same phone data repeated for each person.<br />
<br />
I've attached my report design and my dataset.<br />
<br />
Thoughts/solutions appreciated.
Find more posts tagged with
Comments
fishdan
I figured it out. The answer is to use two tables, and then assign the person dataset the outer table and the phones dataset to the inner. Then apply a filter to the inner table
row["name"] Equal to row._outer["name"]
gravy.
Solution attached, you can use the data from the previous post.
I do still wonder if it could be done with one dataset...
mardan
<blockquote class='ipsBlockquote' data-author="'fishdan'" data-cid="73689" data-time="1298396003" data-date="22 February 2011 - 10:33 AM"><p>
I figured it out. The answer is to use two tables, and then assign the person dataset the outer table and the phones dataset to the inner. Then apply a filter to the inner table <br />
<br />
row["name"] Equal to row._outer["name"]<br />
<br />
gravy.<br />
<br />
Solution attached, you can use the data from the previous post.<br />
<br />
I do still wonder if it could be done with one dataset...<br /></p></blockquote>
<br />
Thank you fishdan!<br />
You helped me a lot.
Jenkinsj5
You could do it with one data set, and use either grouped table or a list on the name. Which would give you this
John
| Home : 314-159-2653
| Cell : 271.828.1828
Mary
| Mobile : 987-159-2653
Steve
| Home : 222-159-2653
| work : (872) 828-1828
| Skype : 555.828.1828
mardan
<blockquote class='ipsBlockquote' data-author="'Jenkinsj5'" data-cid="115499" data-time="1364493903" data-date="28 March 2013 - 11:05 AM"><p>
You could do it with one data set, and use either grouped table or a list on the name. Which would give you this<br />
<br />
<br />
John <br />
| Home : 314-159-2653 <br />
| Cell : 271.828.1828<br />
<br />
Mary <br />
| Mobile : 987-159-2653<br />
<br />
Steve <br />
| Home : 222-159-2653 <br />
| work : (872) 828-1828 <br />
| Skype : 555.828.1828<br /></p></blockquote>
Hi. Im a very very beginner and thanks for my bad english hard to understand some parts.But if i see an example and try ,it easier.I understood because Fishdan shown an example design. If not a big request, You show an example? Thanks. And sorry, im use Googletranslate ^_^
Jenkinsj5
In the help section of BIRT read "Tutorial 1: Building a simple listing report". It also has screen shots to help you get through.