Home
Analytics
XML data linking child element data sets
dnewton
<p>My goal is to write a simple report based on the following XML data. The XML data is provided by a remote source via http RESTful web service. I am looking for the best practice for producing a simple report that would list the sales peoples name in column 1. Column 2 would contain the list of regions (if any) associated with that sales person, and Column 3 the list of account names (if any) assigned to the sale sperson. </p><p> </p><p>Joe Smith Region 1 Account A</p><p> Region 2 Account B</p><p> </p><p>Sally Johnson Region 4 Account C</p><p> </p><p> </p><p>I might anticipate the need to create a multiple data sets each utilizing the same datasource. </p><p>A data set with a row mapping to <sales_person></p><p>A seperate data set with a row mapping to <region></p><p>A seperate data set with a row mapping to <account></p><p> </p><p>An embedded table might be used to output the <region> and <account> columns and mapped to the appropriate data set. My attempts to do this have resulted in the web service data request being made multiple times apparently to retrieve the data sets mapped to child elements of the parent sales person. If the data must be requested multiple times in order to effectivly target and output repeating child elements that is a bit of a showstopper.</p><p> </p><p>Any help would be appreciated.</p><p> </p><p>Here is a sample of the XML data structure.</p><p> </p><p><sales_persons>
<sales_person>
<sales_person_id>100</sales_person_id>
<sales_person_name>Joe Smith</sales_person_name>
<region>
<region_name>Region 1</region_name>
</region>
<region>
<region_name>Region 2</region_name>
</region>
<account>
<account_name>Account A</account_name>
</account>
<account>
<account_name>Account B</account_name>
</account>
</sales_person>
<sales_person>
<sales_person_id>200</sales_person_id>
<sales_person_name>Sally Johnson</sales_person_name>
<region>
<region_name>Region 4</region_name>
</region>
<account>
<account_name>Account C</account_name>
</account>
</sales_person>
</sales_persons></p>
Find more posts tagged with
Magellan BI & Reporting
Comments
kclark
<p>Take a look at <a data-ipb='nomediaparse' href='
http://www.eclipse.org/birt/phoenix/examples/reports/birt2.1/xmlds/index.php'>this
link</a>, it shows how to create a simple report with an XML data source.</p>